Dear Scripting Helpers community,
I am writing to you today because of something I have been trying to figure out on my own, but I couldn't. I'm trying to make a loopable flashing light that activates using a BoolValue. I am asking for someone to support me. If someone could help me, that would be greatly appreciated. If this isn't possible using a BoolValue, please could you list another way of activating it simalar to a BoolValue.
Here is the code that is most likely to be causing the issue -
while true do if script.Parent.Value == true then script.Parent.Parent.light1.Transparency = "0" script.Parent.Parent.light2.Transparency = "0" script.Parent.Parent.light3.Transparency = "0.5" script.Parent.Parent.light4.Transparency = "0.5" wait (1) script.Parent.Parent.light1.Transparency = "0.5" script.Parent.Parent.light2.Transparency = "0.5" script.Parent.Parent.light3.Transparency = "0" script.Parent.Parent.light4.Transparency = "0" else script.Parent.Parent.light1.Transparency = "0.5" script.Parent.Parent.light2.Transparency = "0.5" script.Parent.Parent.light3.Transparency = "0.5" script.Parent.Parent.light4.Transparency = "0.5" end
Thanks alot
BlackpoolTransport and the Nottinghamshire team
Forgot the end for the while true do script?
Change it to this:
while script.Parent.Value == true do script.Parent.Parent.light1.Transparency = "0" script.Parent.Parent.light2.Transparency = "0" script.Parent.Parent.light3.Transparency = "0.5" script.Parent.Parent.light4.Transparency = "0.5" wait (1) script.Parent.Parent.light1.Transparency = "0.5" script.Parent.Parent.light2.Transparency = "0.5" script.Parent.Parent.light3.Transparency = "0" script.Parent.Parent.light4.Transparency = "0" end while script.Parent.Value == false do script.Parent.Parent.light1.Transparency = "0.5" script.Parent.Parent.light2.Transparency = "0.5" script.Parent.Parent.light3.Transparency = "0.5" script.Parent.Parent.light4.Transparency = "0.5" end