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

How Would You Force a Player to Unequip A Tool?

Asked by 4 years ago

If a player is holding a tool in their hand (even if it has no handle), how would you force them to put it away (not drop it). Thanks in advance.

1 answer

Log in to vote
1
Answered by 4 years ago
Edited 4 years ago

Remember to accept this answer if it solved your problem!

Question

How Would You Force a Player to Unequip A Tool?

Solution

Humanoid instances have a method called UnequipTools which when called will unequip the tools that are currently equipped.

Call the method on the humanoid of the player you're trying to unequip tools for.

Example Codeblock

humanoid:UnequipTools() --// unequips all equipped tools. 

Further Reading

(Wiki is down so this directs to a google web cache of the API documentation) https://developer.roblox.com/api-reference/function/Humanoid/UnequipTools

Ad

Answer this question