Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How to tell when a player equips a tool?

How can I tell when a player equips a tool? I've tried this, but nothing happens:


local character = game.Workspace:WaitForChild(game.Players.LocalPlayer.Name)
character.DescendantAdded:connect(function(descendant)
	if descendant.ClassName == "Tool" then
		print("Tool")
	end
end)

1 answer

you can use the Equipped event.

local tool = script.Parent

tool.Equipped:connect(function()
print("Tool Equipped")
end)

If you're checking to see if a certain player has equipped the tool, then you can include a conditional in the equipped script to check the name of the person who equips it.

3 comments

0

I don't want to put the script in a tool

0

where do you want it?

0

PlayerGui

This discussion is preserved as it was. New answers, comments, and votes are closed.