Listener to see if player activates weapon from Server?

Is there a way for the Server to see if a player activates a tool (so Serverscript and not localscript):

game:GetService("Players").PlayerAdded:Connect(function(player)
    player.CharacterAdded:Connect(function(character)

        local swordTool = ServerStorage.Models:WaitForChild("Sword"):Clone()
        swordTool.Parent = player:WaitForChild("Backpack")
    
        swordTool.Equipped:Connect(function()
            print("SWORD EQUIPPED!") -- works
        end)
    
        swordTool.Activated:Connect(function()
           print("SWORD USED!") -- does not work
        end)
    end)
end)

that looks like it should work. maybe you accidentally did something like:

  • didnt give the tool a handle, but set Tool.RequiresHandle to true
  • left the tool disabled

otherwise, you could use a local script to fire a remote event to tell the server that the tool was activated

Nope. The tool has a Handle and is Enabled.

I want to let the Server listen for it because there’s a Sound attached to the Tool. I don’t want exploiters spamming that sound by spamming the remote event to the Server.

Turn off requires handle then it should work (nvm just saw your post)

you could setup a serverside debounce so even if they soam the remote, it won’t spam whatever should trigger

and make sure Tool.ManualActivationOnly is set to false on the tool, and that “Handle” is spelled properly :woman_shrugging: maybe you have trailing spaces, capitalization issues, or “H” is lowercased

1 Like

The Tool.ManualActivationOnly set to false did the charm.

Thanks!

1 Like