How can I tell if a player has something equipped

Hello, I was wondering how I could tell if a player has something equipped? Its a very simple and straightforward question.

Usually any tool inside of a player’s character is the tool they have equipped.

3 Likes

Except the thing is, everyone has more than one tool in their inventory.

They can’t have more than 1 tool equiped, can they? The unequipped tools go in the backpack

1 Like

Oh, my bad I just mean I need to know what tool they have equipped.

But players can only have one tool equipped at a time. When you select a tool it it moved from your backpack to your character. At least with the classic Roblox tools.

local function getEquippedTool(player)
	if (player.Character) then
		local tool = player.Character:FindFirstChildOfClass("Tool")
		if (tool) then
			print(player, "is holding:", tool)
		else
			print(player, "is not holding anything")
		end
	else
		print(player, "has not spawned yet")
	end
end
4 Likes

What I mentioned will work? The tool a player has equipped will be a child of their character.

Oh, sorry I didn’t check that one.