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 from the player GUI?

I'm trying to tell when a player equips a tool. This is in the PlayerGui, not the tool... Nothing happens when I try it:

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 need to put this script in starterplayerscripts, it works when I put it in staterplayerscripts.

4 comments

0

Still doens't work for me.. .I have character auto-loads off... Does that have anything to do with it?

0

I dont know. Try it with character auto-loads.

0

Although it is a better idea to put it in SPS, it won't do anything but make the loading faster.

0

thenwhy does it work for me?

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