catxkdb
(catxkdb)
April 23, 2022, 1:03am
#1
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?
catxkdb
(catxkdb)
April 23, 2022, 6:53am
#3
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.
XRHTech
(MistiikDev)
April 23, 2022, 6:59am
#4
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
catxkdb
(catxkdb)
April 23, 2022, 9:54am
#5
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.
Some of you have already noticed that Humanoid:LoadAnimation, AnimationController:LoadAnimation, and all the other animation related APIs on Humanoid and AnimationController were marked deprecated. This wasn’t an accident!
Of course these deprecated methods are not going away; we can only rarely remove deprecated functionality without breaking games. However, we strongly discourage their use.
Using these deprecated methods as intended can easily lead to broken animation replication. It’s a tra…
1 Like
catxkdb
(catxkdb)
April 24, 2022, 4:20am
#7
It IS loaded on an animator in the viewmodel.
Yes, I am experiencing the same issue. Did you follow a youtube tutorial?
I am making a ViewModel for my FPS game but I have came across this issue when I coded my holding animation: Cannot load the AnimationClipProvider Service?
[image]
This is the line of coding that contains the error:
local Animations = {
["HoldingAnimation"] = ViewModel.AnimationController.Animator:LoadAnimation(ViewModel.Animations.HoldingAnimation)
}
The error is occurring on Line 13.
catxkdb
(catxkdb)
May 23, 2022, 8:48am
#9
I followed PolarisProg’s youtube tutorial on How to make an fps game