I’m trying to make an FPS framework, and until now I encountered no issues.
However, when I add a shooting animation with a gun in hand, the animation sort of bugs, and doesn’t work properly:
So far, I have tried tinkering with some workspace properties to do with animations, but they haven’t fixed the problem.
If it helps, the gun has a handle and only the handle is animatable. The gun model is welded to the handle, the handle is Motor6D’d to the camera part (same with the arms), and the framework uses an animator inside of an animation controller.
As well as this, the shooting animation plays whenever a click occurs.
This could be a few things; maybe the idle animation is getting in the way, “fighting” the shoot animation, or maybe it’s because the way your ViewModel is set up is different from what the rig you animated with was. (I think its probable reason 1, and you can fix that by opening animation editor > changing the animation priority for the shoot anim to say Action4)
It seems that it is more likely to be the second option, because the way the system works is that I add the gun into the viewmodel when their character loads, and then play the animations (although the viewmodel used to animate the idle gun holding animation and the shooting animation are both the same as the viewmodel with the gun Motor6D’d to it in-game). It appears that the viewmodel goes back to its original state when animating, despite the fact that I do not have any keyframes in the first millisecond of the animation. Is there any way to prevent the viewmodel from going back to its default unanimated state when the action animation is played?