Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

VertexColor doesn't change the color at all?

I have a script that is supposed to fade the mesh's VertexColor from one color to the next (in this case, white to red), but it doesn't change the color. The VertexColor does change, though.

function fade(part,from,to,Time)
    Time=Time or 1
    for i=0,1,1/(Time/.03) do
        local col=from*(1-i)+to*i
        part.Mesh.VertexColor=col
        wait(0.03)
    end
end

wait(2)
print'fade'

fade(script.Parent,Vector3.new(0,0,0),Vector3.new(1,0,0),1.5)

1 answer

VertexColor changes the color of the texture of a mesh. If you don't have a Texture set, it doesn't do anything.

This discussion is preserved as it was. New answers, comments, and votes are closed.