tool.script.Parent tool.Equipped:connect(function(mouse) print("equipped") tool.Activated:connect(function() print("activated") mouse.Button1Down:connect(function() print("clicked") if light.PointLight.Brightness==0 then light.PointLight.Brightness=1 print("closed") else light.PointLight.Brightness=0 print("opened") end end) end) end)
The Activated event is fired when the mouse is clicked while a tool is equipped. So, you're telling it to not turn on until it has been clicked, and then clicked again. The mousedown event is redundant.
tool = script.Parent -- This should also be 'tool =', not "tool." . tool.Equipped:connect(function(mouse) print("equipped") tool.Activated:connect(function() print("clicked") if light.PointLight.Brightness==0 then light.PointLight.Brightness=1 print("closed") else light.PointLight.Brightness=0 print("opened") end end) end)