Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do you use the function UnequipTools?

Asked by
Scaii_0 145
5 years ago

I saw it on the wiki but without much information. How would you use the function? Would it be something like:

humanoid:UnequipTools()

and that would unequip whatever tool the character has?

1 answer

Log in to vote
1
Answered by
chomboghai 2044 Moderation Voter Community Moderator
5 years ago
Edited 5 years ago

Yes.

Get a reference to a player's Humanoid instance, and you can use the UnequipTools function on it to unequip any tools that the player may have equipped.

local player = game.Players.LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()
local humanoid = character:WaitForChild("Humanoid")

humanoid:UnequipTools()

Hope this helps :)

Ad

Answer this question