A week ago I posted about this here. I experienced the issue after a sprint animation had finished playing. The arms started off flat and then after the sprint animation they were tilted:
I recently ran into this same issue again though. Out of my two equip animations, the one I use for assault rifles rolls the gun slightly. After an assault rifle is equipped, it’s never aligned properly because the internal CFrame value of the joint for animations didn’t reset properly. The equip animation for pistols doesn’t have this issue because it doesn’t roll the gun (ROBLOX only seems to have issues resetting the roll on animated joints). Here’s a gif of it in action:
For reference, the equip and unequip animation are the same – the equip animation is just the unequip animation transitioning to no animation. Each weapon uses its own equip/unequip animation – in the above gif, starting with the rifle already equipped, the order is:
Unequip (Assault Rifle animation)
Equip (Pistol animation)
Unequip (Pistol animation)
Equip (Assault Rifle animation)
repeat from start
Animation-wise, the equip code is:
unequipAnimation:Play(0,1,1)--Instantly snap gun to off-screen with unequip animation since fadeTime is 0
unequipAnimation:Stop(0.24)--Tween gun back to default over 0.24 seconds with fadeTime of 0.24
The unequip code is:
unequipAnimation:Play(0.12,1,1)--Tween from default to off-screen over 0.12 seconds with fadeTime of 0.12
wait(.18)--Animation takes longer than 0.12 seconds for some reason so wait 0.18 instead of 0.12
unequipAnimation:Stop(0)--Instantly stops animation so equip animation for next weapon can take over
There is no delay from the end of the previous weapon’s unequip and the new weapon’s equip.
In the post mentioned earlier, einsteinK suggested I play a blank animation to reset the internal CFrame value, but it did not work. I played an animation with all parts excluded with a fadeTime of 0 and the roll of the gun was still messed up – it was not reset. Making an animation version of the normal equip C0 for the gun handle and playing that will work, but I don’t want to have to make an animation for every single weapon of mine + it’s a bug and should be reported and fixed regardless of whether it can be fixed by us or not.
If I add this after the equip code:
wait(1)
unequipAnimation:Play(0,1,1)
unequipAnimation:Stop(0)
the problem is reversed – the assault rifle doesn’t have its rotation messed up but the pistol does:
So, the bug has been reported, but if anyone has experienced this and knows how to fix the problem, your input would be greatly appreciated. I’m making some major headway on these guns and they’ve looked great up until recently, but now I’ve run into an unsolvable (AFAIK) issue that makes them look ugly
I will PM a repro file to staff upon request – @discourse whispers pls so I can make this kind of stuff easily available