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

How do i make a brick's color change really smoothly?

Asked by 7 years ago

I have not attempted this, because i don't know how to go along with it, but how do i make a brick's color change smoothly from one color to the next?

1 answer

Log in to vote
0
Answered by 7 years ago

If someone wants to make this script simpler, go ahead but here's a basic understanding of it (I'm not that good of a coder but tried) :

while true do
for i = 1, 255 do
    script.Parent.Color = Color3.fromRGB(255, i, 0)
    wait(.00001)
end
for i = 255, 0, -1 do
    script.Parent.Color = Color3.fromRGB(i, 255, 0)
    wait(.00001)
end
for i = 0, 255 do
    script.Parent.Color = Color3.fromRGB(0, 255, i)
    wait(.00001)
end
for i = 255, 0, -1 do
    script.Parent.Color = Color3.fromRGB(0, i, 255)
    wait(.00001)
end
for i = 0, 255 do
    script.Parent.Color = Color3.fromRGB(i, 0, 255)
    wait(.00001)
end
for i = 255, 0, -1 do
    script.Parent.Color = Color3.fromRGB(255, 0, i)
    wait(.00001)
end
end

It basically just loops a rainbow

Ad

Answer this question