Animation priority not working correctly

I’m having some issues with playing a holding animation for a gun. Whenever I equip the tool the animation plays, but only a part of (just one arm moves) and whenever I start walking the animation goes right through it.

Localscript

local Players = game:GetService('Players')
local Char = Players.LocalPlayer.Character or Players.LocalPlayer.CharacterAdded:Wait()


script.Parent.Equipped:Connect(function()
	local AnimOnTrack = Players.LocalPlayer.Character.Humanoid.Animator:LoadAnimation(script.Parent['Idle HK416'])
	AnimOnTrack.Priority = Enum.AnimationPriority.Action4
	AnimOnTrack.Looped = true
	
	AnimOnTrack:Play()
	script.Parent.Unequipped:Wait()
	AnimOnTrack:Stop()
	
end)

1 Like

Set the AnimationPriority to Action4 on the actual animation panel, then save it to roblox. If that doesn’t work I’ll try and find something

1 Like

No results, it still plays the walking animation on the hands.

1 Like

Maybe just try this.

local Players = game:GetService('Players')
local Char = Players.LocalPlayer.Character or Players.LocalPlayer.CharacterAdded:Wait()

local AnimOnTrack = Players.LocalPlayer.Character.Humanoid.Animator:LoadAnimation(script.Parent['Idle HK416'])
AnimOnTrack.Priority = Enum.AnimationPriority.Action4
AnimOnTrack.Looped = true

script.Parent.Equipped:Connect(function()	
	AnimOnTrack:Play()
end)

script.Parent.Unequipped:Connect(function()
        AnimOnTrack:Stop()
end)

Yes. I know this has more lines of code, but I want to see if this would work

1 Like