Default Roblox animations play improperly on NPCs

I’ve seen a couple threads talking about animations playing in a weird way, but they only apply to user-created animations. I have trouble playing the “wave” animation on NPCs, as they kind of do a half-raised sideways wave:

Is this a problem with animation priority (if so, how do I fix it), or is it a different problem altogether?

This is the code I’m using:

if v:IsA("ProximityPrompt") then
			v.Triggered:Connect(function()
				local animation = clonenpc.Animate:WaitForChild('wave').WaveAnim
				local humanoid = clonenpc:WaitForChild('Humanoid')
				local wave = humanoid:LoadAnimation(animation)
				wave:Play()
				print"test"
			end)
		end
1 Like

I’d be intrigued to know the answer as well, cos I have the same issue with a custom animation on an NPC, which also only seems to raise the arms half way when compared to a player character.

2 Likes

Hmm. Could you try changing a piece of your code (specifically the loading animation/playing it part) to this:

local wave = humanoid:LoadAnimation(animation)
wave.Priority = Enum.AnimationPriority.Action4
wave:Play()
1 Like

Why do you have a 4 at the end?

Yep, I figured it had something to do with priority, so this did the trick. Thank you!

1 Like

It’s a level of the “action” priority, I assume, to compensate for the amount of action animations that may play at once in animation-heavy games (like fighting games)

I know level four is the highest priority setting for animation but you dont need to write the 4 at the end of it.

I usually use Action3 or Action4 when it comes to animations that should override any other priority of animation, such as jumping, falling, running, etc. It’s not necessary if the game doesn’t use animations with a priority higher than Action but I just prefer it this way.

1 Like

Awesome. Never knew about that.

1 Like