Heres the script:
local Button = script.Parent
lightbar1 = script
lightbar2 = script
redlight = lightbar1
bluelight = lightbar2
Button.MouseButton1Click:connect(function()
while true do
lightbar1.redlight.Enabled = true
wait(0.01)
lightbar2.bluelight.Enabled = true
lightbar1.redlight.Enabled = false
wait(0.01)
lightbar1.redlight.Enabled = true
lightbar2.bluelight.Enabled = false
if Button.MouseButton2Click:connect(function()
lightbar1.redlight.Enabled = false
lightbar2.bluelight.Enabled = false
end)
Basically this GUI Button, when clicked, should enable these two surface lights, and if its clicked again, then it stops. I haven't seen any errors in the script, but it still doesn't work when I click the button, any errors in this script?
