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

How to make a tool unequippable?

So I'm having trouble trying to script this out, but if someone gives me an idea how to do it, I may be able to do this! Thank you!

1 answer

So on the Roblox Wiki there is a small section on forcing the player to Unequip a tool

http://wiki.roblox.com/index.php?title=API:Class/Humanoid/UnequipTools

There is the link.

If you are sorta new to scripting youll notice it says "void" next to it, dont put that part into your code. Void means you use a : to tell the code to use that.

For example

-- Notice I used : to connect the function. 
game.Players.PlayerAdded:connect(function(player)
	if player.Character:WaitForChild("Humanoid") then
		player.Character.Humanoid:UnequipTools
	end
end

Was this short block of code will basically do is unequip tools from the player when they are added to the game. You could add a wait for Humanoid... Infact let me do that or this may error.

So the script waits for a player to join, when a player does join it waits for the humanoid if it finds a humanoid it then unequips there tools.

I hope this helped if you have any questions please ask. I am not the best scripter but I am learning so forgive me if this doesnt work.

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