Ive tried tried my usual way of scripting and it seemed to work but It is not working, it does the script once but ends after one go.
Here is the script:
while true do if lighton == false then wait(.3) one.BrickColor = BrickColor.new("Really red") wait(.3) one.BrickColor = BrickColor.new("Institutional white") wait(.3) two.BrickColor = BrickColor.new("Really red") wait(.3) two.BrickColor = BrickColor.new("Institutional white") wait(.3) three.BrickColor = BrickColor.new("Really red") wait(1) three.BrickColor = BrickColor.new("Institutional white") lighton = true end
end
The reason in which your script isn't working is that the if statement is only activated once as the lighton variable is true. When the script finishes, you change the variable lighton back to true, meaning the if statement isn't going to be used and ignore all of the brick colours changing. The way you can do this is by removing the if statement, as it technically has no reason to be there.
while true do --if lighton == false then (This if statement also isn't needed) wait(.3) one.BrickColor = BrickColor.new("Really red") wait(.3) one.BrickColor = BrickColor.new("Institutional white") wait(.3) two.BrickColor = BrickColor.new("Really red") wait(.3) two.BrickColor = BrickColor.new("Institutional white") wait(.3) three.BrickColor = BrickColor.new("Really red") wait(1) three.BrickColor = BrickColor.new("Institutional white") --lighton = true (This isn't needed) end
Apologies for the incorrect formatting, I am on mobile as I can't do 'Tab', if this doesn't work simply just comment and if my answer is correct please click 'Accept answer'.