Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Help me run my animation in my NPC?

wait(1)
if script.Parent.Humanoid.Health < 30 then 

local Stagger = Instance.new("Animation")
	Stagger.AnimationId = "http://www.roblox.com/Asset?ID=227773697"
local animController = script.Parent.AnimationController
local animTrack = animController:LoadAnimation(Stagger)
animTrack:Play()

end

This script is in an NPC and the animation is meant to play when its health is below 30 however it isnt playing. Ive followed the animation tutorials on wiki however there has been no change. I have a HumanoidRootpart in my NPC and an AnimationController. As you can see Im using ROBLOX Animator.

Please Help.

1 answer

✓ Accepted answer

Change the Priority to Action. Sometimes the character's original animations override usermade animations. To change this, make the Priority Action. This makes it so this animation will override all other animations currently playing in the Character.

If you want to know what each Priority does, look here:

What each Priority does

1 comment

0

My priority is at its highest

This discussion is preserved as it was. New answers, comments, and votes are closed.