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

How come "FindFirstChild" doesn't work when a tool is equipped?

I've been working on code for ROBLOX, where the player is checked if they have an item. I use the code: local tool = player.Backpack:FindFirstChild("Tool") if tool == nil then print("Player does not have tool") else print("Player has tool") end

But whenever the player has the tool equipped, the code returns nil. Can someone help me with this? Thanks.

1 answer

✓ Accepted answer

When a Tool is equipped, it's Parent becomes the Player's character. Check for workspace instead or use the Equipped function and the Unequipped function.

1 comment

0

Equipped is not a function, neither is Unequipped. They are events.

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