I have been able to only change the color of one wig with the following script :
local function onClicked(playerWhoClicked) playerWhoClicked.Character.Hat.Part.Mesh.VertexColor = Vector3.new(0.05, 0.412, 0.67) end
script.Parent.ClickDetector.MouseClick:connect(onClicked)
But that only changes one of the wigs I have tried it with.