Animation Loading Error

Im basically trying to load an animation to a animator from a local script and Im getting this error:

HoldAnimTrack = CurrentViewModel.Humanoid.Animator:LoadAnimation(HoldAnimation) 

The rig:
image

Error:
21:54:47.360 LoadAnimation requires the Humanoid object (ViewModel.Humanoid) to be a descendant of the game object

Hi, your issue is that you cannot load the animation like that. You need to upload it to roblox and then add the ID into an instance called Animation. This is so roblox can moderate the animations. If you then change it to load in the animation instance, it should be fine :slight_smile:

1 Like

Oh I forgot to say there is a animation object with ID

local Animations = Tool.Animations

local HoldAnimation = Animations.Hold

Oh wait I see your problem, its just Humanoid:LoadAnimation(), you don’t need to go into the animatior

Isnt it changed to animator:LoadAnimation in the new animation update.

Humanoid:LoadAnimation is deprecated

Oh yeah, I didn’t realise. It’s been a while since I’ve done anything to do with animation.

What exactly is the error you’re getting?

Oh wait I forgot to put the error :laughing: sorry now I put it

this error means that the Humanoid/Animator object has to be a descendant of workspace

But the problem is that it is a descendant of workspace

Can I see the game hierarchy, so I can see what another possible issue could be

Basically the rig is inside game.Workspace.Camera

But if you want I can send it

But not right now maybe a bit later(sorry)

1 Like

I believe the rig cannot be a child of camera, try moving it to just game.Workspace and see if you still get the error

Sure I will try doing that but