So this is a script and this is the original,
On=false
function onClicked()
if On then On=false else
On=true
while On do
game.Workspace.Test2.Light1.BrickColor = BrickColor.new("Medium stone grey")
game.Workspace.Test2.Light2.BrickColor = BrickColor.new("Really red")
game.Workspace.Test2.Light3.BrickColor = BrickColor.new("Medium stone grey")
game.Workspace.Test2.Light4.BrickColor = BrickColor.new("Really red")
wait(0.1)
game.Workspace.Test2.Light1.BrickColor = BrickColor.new("Really red")
game.Workspace.Test2.Light2.BrickColor = BrickColor.new("Medium stone grey")
game.Workspace.Test2.Light3.BrickColor = BrickColor.new("Really red")
game.Workspace.Test2.Light4.BrickColor = BrickColor.new("Medium stone grey")
wait(0.1)
game.Workspace.Test2.Light1.BrickColor = BrickColor.new("Medium stone grey")
game.Workspace.Test2.Light2.BrickColor = BrickColor.new("Medium stone grey")
game.Workspace.Test2.Light3.BrickColor = BrickColor.new("Medium stone grey")
game.Workspace.Test2.Light4.BrickColor = BrickColor.new("Medium stone grey")
wait(0.1)
end
end
end
script.Parent.MouseButton1Down:connect(onClicked)
That is all squared away and finished, now I made this script to be turned on when the other one is turned off so the other one turns off and immediately this comes on to shut it all down
On=false
function onClicked()
if On then On=false else
On=true
while On do
game.Workspace.Test2.Light1.BrickColor = BrickColor.new("Medium stone grey")
game.Workspace.Test2.Light2.BrickColor = BrickColor.new("Medium stone grey")
game.Workspace.Test2.Light3.BrickColor = BrickColor.new("Medium stone grey")
game.Workspace.Test2.Light4.BrickColor = BrickColor.new("Medium stone grey")
wait(0)
end
end
end
script.Parent.MouseButton1Down:connect(onClicked)
And I am not sure how I want to go about this, I have tried many different ways and it is too much for me to handle. But that is what I have on the bottom and it is not working. I want the "Lights" to turn off the second I click. Is there a way to disable or enable the script? I am very lost and need someone to finish the puzzle. This is the last tiny bit of help I need and then I will be done and finished with my project. Does anybody have any ideas?

2 comments
This did not work, I see where you are getting at but I am new to scripting so I am not much help. I tried to edit it some and failed.
Is the script's parent a GUI object?