So when i turn on the light it lights up but when i want to turn it off i want to click it again How would i do this? Here is the code
local sp = script.Parent
sp.ClickDetector.MouseClick:connect(function()
local l = Instance.new("PointLight", script.Parent.Parent.light)
l.Brightness = 11
l.Range = 11
l.Shadows = true
end)
--I just want it to shutoff after i click it agian

1 comment
Try adding a Debounce-type thing [Forgot what it's called] into your Function 'local Debounce = true if Debounce then Debounce = false elseif not Debounce then Debounce = true end'.