How to stop default hand out animation tool from playing roblox

  1. What do you want to achieve? Keep it simple and clear!
    I have an equipped animation when tool is equipped. I want to stop tool’s handout animation

  2. What is the issue? Include screenshots / videos if possible!
    sometimes, the tool’s handout animation plays before my custom equipped animation

  3. What solutions have you tried so far? Did you look for solutions on the Developer Hub?
    I tried putting code in local and server scripts, but none helped me completely override the tool’s handout animation. I also tried to use ChildAdded instead of Equipped. I tried setting toolnone. I have looked at old post, but they dont really help much.

local player = game.Players.LocalPlayer
local tool = script.Parent  -- Assuming this script is a child of the tool
local character = player.Character
if not character then
	return
end

local humanoid = character:FindFirstChild("Humanoid")
if not humanoid then
	return
end

local swordAnimation = Instance.new("Animation")
swordAnimation.AnimationId = "rbxassetid://15505895830"
local newAnimator = humanoid:FindFirstChildOfClass("Animator")
local swordAnimationTrack = newAnimator:LoadAnimation(swordAnimation)
swordAnimationTrack.Priority = 2

-- Reference to the RemoteEvent
local equipToolEvent = game.ReplicatedStorage.EquipToolEvent

-- Function to handle tool equipped event
local function onEquipped()

	swordAnimationTrack:Play()
end

local function onUnequipped()


	swordAnimationTrack:Stop()
end

-- Connect the function to the equipped event
tool.Equipped:Connect(onEquipped)

tool.Unequipped:Connect(onUnequipped)
3 Likes

Instead of
swordAnimationTrack.Priority = 2
try

swordAnimationTrack.Priority = Enum.AnimationPriority.Action2

Priority as a property of an animationtrack is not a number

3 Likes

I tried swordAnimationTrack.Priority = Enum.AnimationPriority.Action2.the handout animation stills play occasionally
https://gyazo.com/6d11f8150ebbd5723187246180bf0c1d

2 Likes

Humanoid:LoadAnimation is a slow method(maybe draegcraptatgrapraderahfatatated?), so it might have delays

2 Likes

yea, that is what I am thinking about and that is why I am trying to disable the default handout animation, so it does not matter if it has delay

2 Likes

He’s using Animator:LoadAnimation() instead of Humanoid:LoadAnimation(), which is two different processes.

However, what I’m seeing is a small delay in the time the animation plays, which is where the hand out animation is.

2 Likes

Humanoid:LoadAnimation() is deprecated. that was what i used at first, but it is still the same.

1 Like

You can achieve it with a very butchered method, but a method that’ll work nonetheless. Follow the steps in the DevForum post I linked and tell me if that works.

2 Likes

I have seen this one and it works for me, but I am not sure if it introduces any bugs later tho@@ since it is engine code. this is what I’ve done incase anyone wanna do this one. I think ill stick with this since using tool with custom handle is more troublesome.

1 Like

I don’t believe this should cause bugs later, the only thing it should do is keep the player’s hand down with a tool equipped.

1 Like

thanks a bunch. This saves me hours trying to figure out the the Anime script

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.