Tool "Activated" not firing

I didn’t know where to put this so I put it into scripting support because it is a scripting bug I am having. I am working on a gun for my game and I am really good at scripting so I decided I would dive into and maybe watch a couple of tutorials if I have to. Now, Activated was firing last time I tried to do a tool but for some reason the function is not firing, I have double checked, there is no problem with the code

script.Parent.Activated:Connect(function()
print(game.Players.LocalPlayer.Name)

end)

script.Parent.Equipped:Connect(function()
print(game.Players.LocalPlayer.Name)

end)

Equipped is firing when I open the tool and I have tried it with requires handle on and off and I have a handle. I am not sure if this is a bug or of they have changed something.

Edit: I found fix by myself, I had to disable manual activation

1 Like

I don’t know why tool.Activated is not firing but maybe you can check if player clicked while holding the tool. If tool.Equpped is fired wait for the player to click.

script.Parent.Activated:Connect(function()
    print("foo")
end)

script.Parent.Equipped:Connect(function()
    print("bar")
end)
game.Players.LocalPlayer:GetMouse().Button1Up:Connect(function()
    print("foo bar")
end)

If it prints “bar” and “foo bar” but not “foo”, then this is a Roblox bug I think.

1 Like

I have had this happen to me before when I was messing around with ‘‘RequiresHandle’’ and all I did was set it to enabled again and I set a variable for the handle of the tool in the script and for some reason it fixed the problem. Try adding this:

local yourtoolhandle = script.Parent:WaitForChild("Handle")

I don’t know if it will solve your problem but it worked for me

I found fix by myself, I had to disable manual activation