its because you're making a new light thats "On" every single time you push the button.
And the script only affects the first light, so this will never turn off.
heres a fix
local player = script.Parent.Parent.Parent.Parent
local bin = script.Parent
local e = Instance.new("PointLight", player.Character.Torso)
e.Name = "Light"
e.Color = Color3.new(0, 0, 255)
e.Enabled = false
function mb1d()
if (bin.Text == "Off") then
bin.Text = "On"
e.Enabled = false
else bin.Text = "Off"
e.Enabled = true
end
end
bin.MouseButton1Down:connect(mb1d) |