Here's the script : [Named TurnL]
while true do script.Parent.TurnLF.BrickColor = BrickColor.new("Br. yellowish orange") script.Parent.TurnLF.SpotLight.Enabled = true wait () script.Parent.TurnLF.BrickColor = BrickColor.new("Really black") script.Parent.TurnLF.SpotLight.Enabled = false end
Here's the script that will Activate it. [A Script inside a block, Inside a model to activate TurnL.]
on = false script.Parent.ClickDetector.MouseClick:connect(function(click) if on == false then on = true script.Parent.Parent.TurnL.Disabled = false else on = false script.Parent.Parent.TurnL.Disabled = true end end)
[TurnLF Is Spelled properly, TurnLF has the SpotLight in it, It's in the correct location.]
I have a separate clickdetector with a script in it which activates this script, Clicking again will deactivate it. However, it decides not to loop when activated and only changes the BrickColor and turns on the SpotLight?
How would i get it to Properly loop when the script is activated? I've tried everything I could think of to fix it. Even tried messing around with Script + Block Names.
The problem is that you have no wait between switching colours at the end of the loop before it loops again(so there is no noticeable difference)
fix)
while true do script.Parent.TurnLF.BrickColor = BrickColor.new("Br. yellowish orange") script.Parent.TurnLF.SpotLight.Enabled = true wait () script.Parent.TurnLF.BrickColor = BrickColor.new("Really black") script.Parent.TurnLF.SpotLight.Enabled = false wait() end