How to use the AnimationClipProvider?

So I currently have created an animation (which is currently in my server storage under a model under animsaves) and I’m unsure on what to do to have it play on my viewmodel (Someone told me to use the animationClipProvider) and after reading the documentation I’m still unsure of what to do.

4 Likes

Are you using a Viewpoint Frame?

1 Like

No, I just updated the viewmodel’s primaryrootpart to the camera frame.

2 Likes

So what are you trying to make?

1 Like

A gunviewmodel. Is it best to use viewpoint frame?

1 Like

Probably not. I can try to make something that may work.

2 Likes

The main question here is just getting the animation to work. updating the Viewmodel’s primarypartcfrrame to the camera cframe is probably the best way know how to do view models but if there’s a better way to do it please tell

1 Like

Are you animating a gun? If you are, can you send me the model?

1 Like

You should read @rokoblox5’s tutorial here. Hope that helps!

2 Likes

I figured it out. I can send it to you if you would like but otherwise I figured it out. It’s just that how do I stop the animation?if another animation plays will it automatically stop the current playing animation?

1 Like

I think so. Try it. Otherwise, just stop the animation some other way.

2 Likes

This solution wasn’t very helpful because the tutorial was using an already uploaded animation to Roblox with an already set id in place while I was only trying to get a temporary hash / id from the keyframesequence using the AnimationClipProvider service (then creating a new “Animation” instance. and setting that id to that hash) But thanks for the tutorial though definitely some helpful tips in there for other gun functionality

2 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.