Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Mesh's vertex color won't change?

Asked by 4 years ago

I'm making an avatar creator that has hair which you can change the color of, and I believe the best (and only) way to do this is to change the mesh's vertex color. I'm not sure if Roblox doesn't allow this, or if I'm doing something wrong in my script. Thanks for any help you can give!

game.ReplicatedStorage:WaitForChild("HairColor").OnServerEvent:Connect(function(player,r,g,b)
    local char = player.Character or player.CharacterAdded:Wait()
    for i,v in pairs(char:GetChildren()) do
        if v:IsA("Accessory") and v.Name == "Hair" and v:FindFirstChild("Handle") then
                v.Handle.Mesh.VertexColor = Vector3.new(r,g,b)
        end
    end
end)
0
Does Handle have a textureId? Arctanh 1 — 4y
0
No... Accessories have parts named handles which have the meshes inside them CaptainAlien132 225 — 4y

Answer this question