Cannot load the AnimationClipProvider Service Error

I keep getting this error when I try to play an animation on a viewmodel (that has an animation controller + animator + it is animatable). Here is my line:

local viewModel = replicatedStorage:WaitForChild('MainGame'):WaitForChild('Guns'):WaitForChild('ViewModel'):Clone()
viewModel.Parent = camera
local animations = {-- The line below errors.
	['Hold'] = viewModel.AnimationController.Animator:LoadAnimation(viewModel.Animations.Hold)
}
animations['Hold']:Play() 

1 Like

Well, That error can occur if the animation is tried to run when for example the player character is not fully loaded. Is that all your code?

No, but the other parts of code are not affected by this. It’s only the animation that doesn’t play and there is an error.

I’ve had the same issue before. I found a fix, make your model or animated part in workspace, load animation and then get it back to it’s original location

Still the same error, I tried putting it in the workspace, loading animation and then putting it back in the camera.

You cant use AnimationClipProvider on a localscript.

Anyways this is deprecated, try loading the animation in a Animator. Considier reading this.

1 Like

It IS loaded on an animator in the viewmodel.

Yes, I am experiencing the same issue. Did you follow a youtube tutorial?

I followed PolarisProg’s youtube tutorial on How to make an fps game