DModelPanel and DColorMixer

Hello, I was wondering how to make a DColorMixer color the clothing of a DModelPanel (playermodel in this case)

So far I’ve tried the following:



function PaintThing:ValueChanged(color)
   		Model:SetColor(color);
end


However it colors the whole model (face, everything.) Is there anyway I can fix this?

Thanks

Sandbox does this for player model selection – I don’t know where off-hand. Try searching for instances of DModelPanel.

hmm, I found a few instances of people doing the same thing and it works fine.

Not sure if I’m doing something wrong or what. It colors the model (as a whole) unlike the one used in the default sandbox context menu.

You can find out how the sandbox thing did it yourself, if you only bothered to actually try to look for it.

How does GetPlayerColor help him color only clothing?

You’d add that function to the model panel’s entity and make it return your desired color, or possibly in this case the client’s player color.