How do I stop a tool from being equipped?

I am making a game where there is a script to become ragdoll but weapons can be used when your character is in ragdoll. I tried the Tool.Enabled but it did not work apart from the weapon falling off the map

Can someone give me an idea of ​​how I can do so that it cannot be equipped?:thinking:

Try looking at the In-Experience Tools | Roblox Creator Documentation and you’ll also need to know this one Humanoid | Roblox Creator Documentation

1 Like

try humanoid:UnequipTools(your tool).

2 Likes
script.Parent.Equipped:Connect(function()
	wait()
	script.Parent.Parent = game.Players.LocalPlayer.Backpack
end)
local tool = script.Parent
local allowedToEquip = false

tool.Equipped:Connect(function()
	local char = tool.Parent
	local hum = char:WaitForChild("Humanoid")
	if not allowedToEquip then
		hum:UnequipTools()
	end
end)

task.wait(10)
allowedToEquip = true

UnequipTools() doesn’t require an argument, it’ll just unequip whatever tool is currently equipped when called through the humanoid instance of the character.

The above script is just an example of how this behavior could be achieved.

1 Like