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

Make the player unequip the tool he is holding, how?

I cannot make the player unequip all of his tool he is holding, how can i make it unequipped?

for i, v in pairs(game.Players:GetPlayers()) do
		name = v.Name
		check = game.Workspace:FindFirstChild(name)
		if check then
			human = check:FindFirstChild("Humanoid")
			if human then
				-- part of the problem
				tools = check:GetChildren()
				if tools:IsA("Tool") then
					tools:Destroy()
				end
			end
		end
	end

1 answer

✓ Accepted answer

There is a method of Humanoid called UnequipTools

More info here

1 comment

0

Thanks, that worked, now i can continue on my project

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