Hello all!
I was working away with a script, making lights change colour. I want it to cycle round one of them for a few times, then do the next pattern a few times, then go back to the start. This what I have:
local light = script.Parent.SpotLight
while true do
light.Color = Color3.fromRGB(46, 153, 252)
wait (.5)
light.Color = Color3.fromRGB(252, 105, 0)
wait (.5)
light.Color = Color3.fromRGB(63, 252, 42)
wait (.5)
light.Color = Color3.fromRGB(252, 0, 4)
wait (.5)
light.Color = Color3.fromRGB(46, 153, 252)
wait (.1)
light.Color = Color3.fromRGB(252, 105, 0)
wait (.1)
light.Color = Color3.fromRGB(63, 252, 42)
wait (.1)
light.Color = Color3.fromRGB(252, 0, 4)
wait (.1)
end
end
end
I would like it to run through the top section for a few times (lets say 4), then the bottom one to run for 10, then back to the start again (so it repeats the 4, then 10, then 4 etc…). Currently it only runs the top one once, then the bottom one once, then cycles like that.
If anyone could let me know how to fix this, that would be fab. Thanks in advance!