Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Help me run my animation in my NPC?

Asked by
neoG457 315 Moderation Voter
9 years ago
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

Log in to vote
0
Answered by 9 years ago

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

0
My priority is at its highest neoG457 315 — 9y
Ad

Answer this question