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.
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.