Is there a script that forces the tool to be turned off?

Is there a script that forces the tool to be turned off?

2 Likes

tool.Enabled

1 Like

what exactly do you mean by this? as in disable the tool, or unequip it?

2 Likes

I want to know how to release the weapon the player is wearing.

I still have no idea what you mean.

As in Drop the Tool: Backspace
To force it out of their inventory, you just take it out and place in the workspace

As in unequip the Tool: Humanoid:UnequipTools()
Unequips the Tool they have.

1 Like

You also have the option to destroy the tool in the players backpack.

This is the function I’m looking for, and when the player takes it out again, he picks up the weapon, and I want to stop it.
->Humanoid:UnequipTools()

mouse.KeyDown:Connect(function(Key) 
	if Key == "c" then
		local Animation = Instance.new("Animation", player.Character)
		Animation.AnimationId = "rbxassetid://12784449345" -- Paste your ID
		Animate = Humanoid:LoadAnimation(Animation)
		Animate:Play()
		Humanoid.WalkSpeed = 0
		Humanoid:UnequipTools()
	end  
end)

I don’t want to destroy it. I just hope they put down their weapons. And I don’t want the player to ever take up a weapon again.

you can Unequip the Tools, and then Disable the Backpack Gui using SetCoreGuiEnabled

StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.Backpack, false) -- Disables Toolbar and Inventory
Humanoid:UnequipTools() -- Unequips Tools

Thank you! It worked well, but it has a fatal flaw. It should not be able to move after the animation is activated, but it moves at a strange speed after the weapon is released.

robloxapp-20230315-0024397.wmv (614.7 KB)