Gun reloading animation acting weird?

Hey guys! So I made a reload animation for my gun and I scripted to play it. So for reload my character’s right arm will take out the mag, flip it 360 and plug the mag back into the gun. It does work perfectly, but sometimes, the animation bugs out to where the animation acts kinda weird. It loads perfectly fine, every limb, every handle is perfectly fine, EXCEPT THE MAG that’s animated. Basically what it does is either offset like below the arms or it animates the opposite direction…?? and returns its position back to the gun. I currently have a Motor6D of the mag attached to the right arm (it doesn’t seem like it is a problem b/c the gun handle is also Motor6D’d to the left arm and it does not offset). And I’ve tried resetting the mag’s pivot etc. The C0 position and orientation do not match for the Motor6D. I really do not know why this is happening, I have spend hours and I am crying. I’ve also added print statements where the Mag’s starting position has shifted significant amounts (from -316 to -289). Conclusion: I hate animating. I have never animated in my life. Roblox animating is confusing. :sob:

Let me know if y’all want to see the clip of the animation bugging

Can I see the clip of the animation? Also theres a few things I can think of off the top of my head that you can try, like enabling ‘Massless’ on the mag, disabling its collision, making sure the animations priority is Action4, and you could make a script that listens for stepped (assuming this is on the client) and manually resets the m6d

this was the reload animation that was MEANT to work
Image from Gyazo

1 Like

this is the one that is bugging:
Image from Gyazo

I dunno what it’s doing so I’m guessing it is either offset by y-axis or the animation of the mag plays the opposite rotation and direction

I honestly can’t think of anything, sometimes animations are weird like this and don’t play nice, and it can be for a really wide variety of random and obscure reasons, honestly I would say try re-rigging the gun, and if it still doesn’t work, reanimate the re-rigged gun

Do you have an idle animation playing by chance? I believe I ran into a similar issue, try setting your priority of your reload to like Action 2 (or above your idle animation), and see if that works.

1 Like

Umm how do I know if an idle animation is playing? The game is fully R6

To stop animations (which will probably fix this bug) Try using this script before playing your animation for _, animation in pairs(humanoid:GetPlayingAnimationTracks()) do animation:Stop() end -- play animation Replace the -- play animation with your animation. Its late and I was too lazy to test this out.

You can use animation priorities but for my game to completely remove the issue of animations blending (some games will have problems using this,) but go to Workspace and click the Workspace
image

then in the properties tab scroll all the way down to attributes. In there create a boolean value naming it “RbxLegacyAnimationBlending” (remove quotes when making) and set it to enabled or true.
image

Then test the game and the issue will most likely be fixed.

Hello! I tried stopping all other animations + added RbxLegacyAnimationBlending + re-exporting my animation with a priority of animation 4. Nothing worked. :frowning:

1 Like

Okay I found out what is going wrong!! When I load the animation in game, the animation refuses to acknowledge the mag’s individual track in the animation and instead makes the mag go along with the left arm which makes it look like its horribly offset

1 Like

glad you found the solution! Mark your response as the solution!

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