Non-Humanoid Animation

Why are you creating an animator instance.
If you’re trying to make a dummy instance to move then you can just load the animation onto it’s humanoid such as like this

local dragon = script.Parent
local humanoid = dragon.Humanoid

local animation = Instance.new("Animation")
animation.AnimationId = "rbxassetid://8305318154"
animation.Parent = script

humanoid:LoadAnimation(script.Animation):Play()

Note that this will only work IF you have set an animation to the dragon with the dragon rig and if you inserted a humanoid. + You do not need to create an animator instance as it’s already a default setting for players and models do not require to use them.

Players can also have animations loaded to their humanoid but it’s better to do so with the animator

The dragon does not have a humanoid; is it possible to apply the animation using an AnimationController, instead?

My guy just add a humanoid into it.
Do you not know how to do that?

Also did you make the animation? or you just used a random one from the internet

Yeah, I did. I will try adding the humanoid.

AnimationController is depricated.
so it’s not usable.

Humanoid also doesn’t seem to work. I added it under the dragon model and changed the script accordingly.

Try this:
remove ‘animator’ and change animation track to this:

local animationTrack = animationController:LoadAnimation(animation)
wait(5)
animationTrack:Play()

you can put an animator under an animation controller and load it onto the animator
but is the animation yours?

local dragon = script.Parent
local humanoid = dragon.Humanoid

local animation = Instance.new("Animation")
local animcont = Instance.new("AnimationController")
local anim = Instance.new("Animator")
animation.AnimationId = "rbxassetid://8305318154"

-- Parents -- 

animation.Parent = script
animcont.Parent = script.Parent
anim.Parent = animcont
anim:LoadAnimation(script.Animation):Play()

I tried that but it also doesn’t seem to work.

Yes, the animation is mine, I will try that. I made it using Moon Animator and everything seemed to work when I tested it within the animator.

local dragon = script.Parent
local humanoid = dragon.Humanoid

local animation = Instance.new("Animation")
local animcont = Instance.new("AnimationController")
local anim = Instance.new("Animator")
animation.AnimationId = "rbxassetid://8305318154"

-- Parents -- 

animation.Parent = script
animcont.Parent = script.Parent
anim.Parent = animcont
anim:LoadAnimation(script.Animation):Play()

try this maybe?

Humanoid:LoadAnimation and AnimationController:LoadAnimation are deprecated, all they did was call Animator:LoadAnimation anyway.

I just tested what I sent you on one of my own animations, works pretty simply, and very well. So, you likely have another problem.
So you can see what I did:
https://i.gyazo.com/3a9c31467024209c2728540ec5316842.gif

Here are a few things you can try checking:

  1. are the models parts anchored?
  2. is the animation priority very low?
  3. is the animation id wrong?

Does priority need to be set for all animations? Everything else has been done.

sometimes animations with low priority get overridden by another animation. But that’s probably not your issue if your model does not have other animations.

Since it’s not an issue with you not having usable code. It’s an issue with something else. And we have no way of figuring it out without checking out your model since I can’t think of any past issues similar to yours.

Either way it’s not a scripting support issue it seems. I wish you the best of luck.

Okay, for anyone who was curious about what I was doing wrong, just like @LadyAka said, it had nothing to do with the script.

Actually, I didn’t rig my model properly. For anyone like me who has no clue how to rig and animate, I would highly recommend this tutorial I found and used on YouTube:

But anyway, thanks to everyone for your help! The animation works now.

1 Like

yeah lol
I think they’re trying to make the animator the base way to make animations.

that’s why I asked if the model was yours T-T