How to delete the "Hand up" animation that plays when equipping a tool?

Hello.

I need to know if there is any way to delete or somehow disable the animation that plays on default when equipping a tool.

I’ve looked around the dev forum and found a post relating to this but the solution involved using another animation to counteract it. I’ve also tried using this script, but it didn’t work.

for _, playingTracks in pairs(humanoid:GetPlayingAnimationTracks()) do
	playingTracks:Stop()
end

To clarify, I’m looking for a way to delete the “Hand up” animation that plays on default when equipping a tool.

Here is my script:

local player = game:GetService("Players").LocalPlayer
local character
local humanoid

local idleAnim

local connection
script.Parent.Equipped:Connect(function()
    character = player.Character or player.CharacterAdded:Wait()
    humanoid = character:WaitForChild("Humanoid")
    
    for _, playingTracks in pairs(humanoid:GetPlayingAnimationTracks()) do
	    playingTracks:Stop()
    end
    
    if not idleAnim then
	    idleAnim = humanoid:LoadAnimation(script:WaitForChild("Idle"))
    end
    idleAnim.Looped = true
    idleAnim:Play()
    connection = script.Parent.Activated:Connect(function()
    end)
end)

script.Parent.Unequipped:Connect(function()
    idleAnim:Stop()
    connection:Disconnect()
end)
12 Likes

What you can do is disable requireshandle property on the tool and weld/attach the handle at runtime to hand.

2 Likes

I believe creating your own type of handle could be a resolution. For that you would need to avoid using “Handle” and instead have the pseudo handle be cframed or welded to the players hand instead.

@viindicater I’ll try that out, thank you!

1 Like

You can weld it on equip (or when the player spawns, it doesn’t matter) but it’s bad practice to destroy on unequip and weld it back on equip (unless you’re using weldconstraint). What you can do is once it’s welded, just hide and show on unequip/equip (by changing Transparency)

I’m getting a new error.

After equipping, it works fine for a bit.

Around 1-2 seconds in, the object deletes itself.

https://gyazo.com/8b8af2f03fccc3f94c2e0e00479f4d61

It removes itself from my inventory too. Any idea why?

probably happening due to a script, but not sure. Edit: can you give a copy of the place file?

There’s too much work that I put into this for me to give it out, but this is the only code that would affect the tool.

local player = game:GetService("Players").LocalPlayer
local character
local humanoid

local idleAnim

local connection
script.Parent.Equipped:Connect(function()
	character = player.Character or player.CharacterAdded:Wait()
	humanoid = character:WaitForChild("Humanoid")
	
	local weld = Instance.new("Weld",script.Parent:WaitForChild("Gun"))
	weld.Part0 = script.Parent:WaitForChild("Gun")
	weld.Part1 = character["Right Arm"]
	weld.C0 = CFrame.new(0, 0, 0) + Vector3.new(0,character["Right Arm"].Size.Y/2,0)
	
	if not idleAnim then
		idleAnim = humanoid:LoadAnimation(script:WaitForChild("Idle"))
	end
	idleAnim.Looped = true
	idleAnim:Play()
	connection = script.Parent.Activated:Connect(function()
	end)
end)

script.Parent.Unequipped:Connect(function()
	idleAnim:Stop()
	connection:Disconnect()
end)
1 Like

This is the script I use to disable the handle animation.

ServerScriptService:

local NOHANDOUT_ID = 04484494845

local function DisableHandOut(character)
	local Animator = character.Animate
	local Animation = Instance.new("Animation")
	Animation.AnimationId = "http://www.roblox.com/asset/?id="..NOHANDOUT_ID

	local ToolNone = Animator:FindFirstChild("toolnone")
	if ToolNone then
		local NewTool = Instance.new("StringValue")
		NewTool.Name = "toolnone"
		Animation.Name = "ToolNoneAnim"
		Animation.Parent = NewTool
		ToolNone:Destroy()
		NewTool.Parent = Animator
	end
end

game.Players.PlayerAdded:Connect(function(player)
	player.CharacterAdded:Connect(function(character)
		DisableHandOut(character)
	end)
end)
46 Likes

That did the trick, thank you!

1 Like

That’s called a workaround. You’re overriding the the default animation by playing another one yourself. Why do that when you can avoid the default animating being played in the first place? look at this for example: (note: this only shows how to weld on equip, does not handle unequip, but this should teach you what you’re looking for)
HandleNoAnim.rbxl (20.2 KB)

EDIT: The other method is good if you want to play a custom default animation but not if you want to go ‘animation-less’ on default.

1 Like

The script I provided achieves everything yours does but with less work.

3 Likes

That’s a matter of situation. With your way, you have to stop that animation every time you want to play an animation for tool use, and then play it again after the use animation ends. Your way is the way to go (meaning the proper way) if you want a custom equip/idle animation for equip, but not if you sheerly want to remove the default equip/idle animation.

With my way, you don’t have to stop the animation and replay it again just as you don’t have to stop/replay the default handle animation. It literally has all the same behavior as a normal tool but just gets rid of the holding animation.

6 Likes

Thank you so much man, helped me out so much :pray:t5: I almost punched my screen :sob:

5 Likes