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)
✓ ANSWER ACCEPTED
Why do I have to doubleclick for my tool(light) to turn on?
1 answer
✓ Accepted answer
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)
This discussion is preserved as it was. New answers, comments, and votes are closed.

2 comments
ohhhhh, derp me. ty
No problem.