I made a remote event, when this gui button is pushed it will turn on the the LeftArrow lights on a police lightbar. The lights are controlled by script 1 below. When the remote event is fired by clicking a button it fires a server script which changes the IntValue (on) to 11. This turns on the script below, but it also enables the RightArrow lights, but I have no idea how or why it does this. The script for the RightArrow is found below (script 2). RightArrow should turn on when the value is 10 but instead turns on when the value is 11.
1
while true do wait() if script.Parent.on.Value == 11 then script.Parent.B1AMBER.Transparency = 1 script.Parent.B2AMBER.Transparency = 1 script.Parent.BO1AMBER.Transparency = 1 script.Parent.B3AMBER.Transparency = 1 script.Parent.B4AMBER.Transparency = 0 wait(.35) script.Parent.B1AMBER.Transparency = 1 script.Parent.B2AMBER.Transparency = 1 script.Parent.BO1AMBER.Transparency = 1 script.Parent.B3AMBER.Transparency = 0 script.Parent.B4AMBER.Transparency = 0 wait(.35) script.Parent.B1AMBER.Transparency = 1 script.Parent.B2AMBER.Transparency = 1 script.Parent.BO1AMBER.Transparency = 0 script.Parent.B3AMBER.Transparency = 0 script.Parent.B4AMBER.Transparency = 0 wait(.35) script.Parent.B1AMBER.Transparency = 1 script.Parent.B2AMBER.Transparency = 0 script.Parent.BO1AMBER.Transparency = 0 script.Parent.B3AMBER.Transparency = 0 script.Parent.B4AMBER.Transparency = 0 wait(.35) script.Parent.B1AMBER.Transparency = 0 script.Parent.B2AMBER.Transparency = 0 script.Parent.BO1AMBER.Transparency = 0 script.Parent.B3AMBER.Transparency = 0 script.Parent.B4AMBER.Transparency = 0 wait(.35) script.Parent.B1AMBER.Transparency = 0 script.Parent.B2AMBER.Transparency = 0 script.Parent.BO1AMBER.Transparency = 0 script.Parent.B3AMBER.Transparency = 0 script.Parent.B4AMBER.Transparency = 1 wait(.2) script.Parent.B1AMBER.Transparency = 0 script.Parent.B2AMBER.Transparency = 0 script.Parent.BO1AMBER.Transparency = 0 script.Parent.B3AMBER.Transparency = 1 script.Parent.B4AMBER.Transparency = 1 wait(.2) script.Parent.B1AMBER.Transparency = 0 script.Parent.B2AMBER.Transparency = 0 script.Parent.BO1AMBER.Transparency = 1 script.Parent.B3AMBER.Transparency = 1 script.Parent.B4AMBER.Transparency = 1 wait(.2) script.Parent.B1AMBER.Transparency = 0 script.Parent.B2AMBER.Transparency = 1 script.Parent.BO1AMBER.Transparency = 1 script.Parent.B3AMBER.Transparency = 1 script.Parent.B4AMBER.Transparency = 1 wait(.2) script.Parent.B1AMBER.Transparency = 1 script.Parent.B2AMBER.Transparency = 1 script.Parent.BO1AMBER.Transparency = 1 script.Parent.B3AMBER.Transparency = 1 script.Parent.B4AMBER.Transparency = 1 wait(.4) else script.Parent.B1AMBER.Transparency = 1 script.Parent.B2AMBER.Transparency = 1 script.Parent.BO1AMBER.Transparency = 1 script.Parent.B3AMBER.Transparency = 1 script.Parent.B4AMBER.Transparency = 1 end end
2
while true do wait() if script.Parent.on.Value == 10 then script.Parent.B1AMBER.Transparency = 0 script.Parent.B2AMBER.Transparency = 1 script.Parent.BO1AMBER.Transparency = 1 script.Parent.B3AMBER.Transparency = 1 script.Parent.B4AMBER.Transparency = 1 wait(.35) script.Parent.B1AMBER.Transparency = 0 script.Parent.B2AMBER.Transparency = 0 script.Parent.BO1AMBER.Transparency = 1 script.Parent.B3AMBER.Transparency = 1 script.Parent.B4AMBER.Transparency = 1 wait(.35) script.Parent.B1AMBER.Transparency = 0 script.Parent.B2AMBER.Transparency = 0 script.Parent.BO1AMBER.Transparency = 0 script.Parent.B3AMBER.Transparency = 1 script.Parent.B4AMBER.Transparency = 1 wait(.35) script.Parent.B1AMBER.Transparency = 0 script.Parent.B2AMBER.Transparency = 0 script.Parent.BO1AMBER.Transparency = 0 script.Parent.B3AMBER.Transparency = 0 script.Parent.B4AMBER.Transparency = 1 wait(.35) script.Parent.B1AMBER.Transparency = 0 script.Parent.B2AMBER.Transparency = 0 script.Parent.BO1AMBER.Transparency = 0 script.Parent.B3AMBER.Transparency = 0 script.Parent.B4AMBER.Transparency = 0 wait(.35) script.Parent.B1AMBER.Transparency = 1 script.Parent.B2AMBER.Transparency = 0 script.Parent.BO1AMBER.Transparency = 0 script.Parent.B3AMBER.Transparency = 0 script.Parent.B4AMBER.Transparency = 0 wait(.2) script.Parent.B1AMBER.Transparency = 1 script.Parent.B2AMBER.Transparency = 1 script.Parent.BO1AMBER.Transparency = 0 script.Parent.B3AMBER.Transparency = 0 script.Parent.B4AMBER.Transparency = 0 wait(.2) script.Parent.B1AMBER.Transparency = 1 script.Parent.B2AMBER.Transparency = 1 script.Parent.BO1AMBER.Transparency = 1 script.Parent.B3AMBER.Transparency = 0 script.Parent.B4AMBER.Transparency = 0 wait(.2) script.Parent.B1AMBER.Transparency = 1 script.Parent.B2AMBER.Transparency = 1 script.Parent.BO1AMBER.Transparency = 1 script.Parent.B3AMBER.Transparency = 1 script.Parent.B4AMBER.Transparency = 0 wait(.2) script.Parent.B1AMBER.Transparency = 1 script.Parent.B2AMBER.Transparency = 1 script.Parent.BO1AMBER.Transparency = 1 script.Parent.B3AMBER.Transparency = 1 script.Parent.B4AMBER.Transparency = 1 wait(.4) else script.Parent.B1AMBER.Transparency = 1 script.Parent.B2AMBER.Transparency = 1 script.Parent.BO1AMBER.Transparency = 1 script.Parent.B3AMBER.Transparency = 1 script.Parent.B4AMBER.Transparency = 1 end end