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)
2 comments
What exactly are you trying to do? I can help, just provide that.
I need a script which will toggle the light on and off