Why is my animation not working? Please help!

I’m trying to animate the head of my NPC to move and nod. The animation was done on an R15 Rig and the NPC that I’m trying to perform the animation is also an R15 rig.

This is the code that I am using:


local animation = script:WaitForChild('Animation')
local humanoid = script.Parent:WaitForChild('Humanoid')
local dance = humanoid:LoadAnimation(animation)

dance.Looped = true

dance:Play()

Please note that all the body parts are unanchored

And this is my file tree:

1 Like

Ran into the same issue, use the neck motor2d in the torso

I see, I’d rather just wait till someone else can solve the problem. I don’t feel like manually animating the head via scripting.

this is really the only way you can do it unless you make the head manually move using animations

You can use CFrame.lookAt and times the rotation by the CFrame of the npc to make it look at the player

So what’s the whole point of having the animation feature on roblox then? It’s kinda dumb if this is the only way if animations don’t even work at all.

I see, thanks for the advice. I’ll take it under consideration

maybe try loading the track from the animator. Im not sure tho

local animation = script:WaitForChild('Animation')
local humanoid = script.Parent:WaitForChild('Humanoid')
local animator = humanoid:WaitForChild('Animator')
local dance = animator:LoadAnimation(animation)

dance.Looped = true

dance:Play()
1 Like

the dummy you have in your screenshot is r6? is that the dummy u want to animate? if so thats the issue

No the dummy is R15


Update:

Animations only work if you generate a rig via from the avatar option. It seems like animations will not work on free model dummies.

@finalSteps333 @j_91 @Zer0Wit
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

1 Like