So, Here's a photo of my workspace, well, of which part is involved in the code:
http://prntscr.com/3o2ppq
The script I have tried has failed many times as I don't know anything about If Statements or click bricks.
Please help me with this as it important for a group meeting area that this is done.
while true do wait() p=script.Parent if p.L1.P1.Enabled==true then p.L1.P1.Enabled=false p.L2.P2.Enabled=false p.L3.P3.Enabled=false p.L4.P4.Enabled=false elseif p.L1.P1.Enabled==false then p.L1.P1.Enabled=true p.L2.P2.Enabled=true p.L3.P3.Enabled=true p.L4.P4.Enabled=true end wait(5) end
I'm not sure all that you want, but this basically will turn them on/off then wait 5 seconds, turn them back on, wait 5, in an infinite loop
So you want them to click the button and toggle lights on/off? I can help. (I don't know why people are taking rep from you over lack-of-knowledge...) First off, insert a click detector into the button. Now, insert this script into the button. (Not a LocalScript)
local on = false local sp = script.Parent script.Parent.ClickDetector.MouseClick:connect(function() if on == false then sp.L1.P1.Enabled = true sp.L2.P2.Enabled = true sp.L3.P3.Enabled = true sp.L4.P4.Enabled = true on = true elseif on == true then sp.L1.P1.Enabled = false sp.L2.P2.Enabled = false sp.L3.P3.Enabled = false sp.L4.P4.Enabled = false on = false end end)