Idle animation strange behavior

  1. What do you want to achieve?
    I want the animation I made to work properly and not behave so strangely

  2. What is the issue?
    As you can see in the attached videos

local humanoid = character:WaitForChild("Humanoid")
local anim = Instance.new("Animation")
anim.AnimationId = "rbxassetid://130348689160816"
local track

toolPickaxe.Equipped:Connect(function()
	track = humanoid:LoadAnimation(anim)
	track.Priority = Enum.AnimationPriority.Idle
	track.Looped = true
	track:Play()
end)

toolPickaxe.Unequipped:Connect(function()
	track:Stop()
end)
  1. What solutions have you tried so far?
    I haven’t found any content that solves my problem

This happens because when a tool is equipped, it plays a default animation alongside your custom animation.
You can do any of the following:

  1. Set the AnimationPriority of your animation to be Action and higher for it to override the default animation.
    9dec040277a01a3a65d4655cf46f12744008bd93
    from this post.

  2. Stop playing the default animation by looping over Animator:GetPlayingAnimationTracks and checking if the animation name is ToolEquip or a similar name.

2 Likes

I’ve already changed the priority of the action and it fixed itself, but thank you for your help!

1 Like