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

Question about while true do loops/color changing SpotLight script?

Asked by
R_alatch 394 Moderation Voter
5 years ago

I have a script that changes the color of a spotlight and I'm trying to make it faster than what it currently is. I put wait(0.5), but every time it takes over a second to change colors. I used to be able to make a very simple disco floor where it would change colors of each tile at whatever rate I made it. Now, it takes over a second for the color to change every time.

while true do
    script.Parent.Color = Color3.fromRGB(math.random(1, 255), math.random(1, 255), math.random(1, 255))
    wait(0.5)
end

Answer this question