Hey there!
I have a script that changes colors randomly of spotlights, but I want to get all of the lights to change color at the same time. Right now, it’s changing their color one at a time.
Here’s my script:
for index, descendant in pairs(descendents) do
if descendant:IsA("SpotLight") then
descendant.Color = Color3.new(math.random(), math.random(), math.random())
wait(0.2)
end
end
I used to use while true do, but that didn’t let it go on to the next light, and for i = 1, 10 or something
did the same thing, except it only changed one at a time, then moved on.