How can I use SetPlayerColor on a ragdoll?

I’m stumped. I know it involves matproxies, but I have no idea how to use them.

Here’s my attempt
[lua]
if ent.GetPlayerColor then
local col = ent:GetPlayerColor()
ragdoll.GetPlayerColor = function() return col end
end
[/lua]

Assuming the ragdoll uses a model that has textures that use the player model matproxy, you must do that clientside.

Oh okay, I’ll try doing it client-side.

[editline]16th August 2015[/editline]

Worked great. Thanks.