Weird animation reverse bug

I’m trying to animate a reload animation, it’s fine when I edit it in the animation editor, but why is it reversed/performing weird when I called it with LoadAnimation
This is how it should be:
https://gyazo.com/7c413cac2c43e11e5dabb4a74741f2c1
This is how it performs in game:
https://gyazo.com/4ad9ab0de0da741534cb50109be407b4

FYI, there’s a Motor6D inside dummy’s right arm and the tool’s handle such that I can animate with the tool, but I think that’s not relatable to this problem?

2 Likes

Hmmm… I’m not yet an expert on this, so don’t take my word as fact.
I’m not sure which issue you’re exactly describing, so I’ll just provide my explanations for both.

In most game engines, there is a dedicated ‘transition’ system for animations. This allows animators to not have to animate every possible transition possible. (Running to falling, walking to falling, swimming to running)

Sadly, Roblox doesn’t have this feature. When an animation is done or a new animation is called for (idle to walking) Roblox just rushes to the first keyframe of the called on animation with a linear transition as fast as possible. If you want to see this in action, make an idle animation then make a walk animation where the torso is much lower to the ground.

I assume you’re waiting until the next animation stops to play a new one. This wait time includes the amount of time needed to return to the idle position, which is why it looks off.

How to fix this? Well, Roblox recently added a feature called “Animation Events.”

Animate all the reloads (if the shotgun has a maximum capacity of four, make an animation where it reloads four times) and add an animation event at the end of each reload. Using a script, check if the shotgun is at maximum capacity, if the player has cancelled the reload, or if the player is out of extra ammo.

Moving onto tools, when you equip a tool a weld between the Right Arm and the Handle is created. You’ll need to create a script to delete this weld, then the shotgun should move in-game.

6 Likes

I kinda solved the entire problem on welding arms, Motor6D etc, you might like to read this:

However, this still happens. I already reanimate the animation.
When the R key is being pressed, the player will reload one bullet (I might change this soon but I want to work on basic mechanics first for now).

This is what the animation should look like:
https://gyazo.com/6229ecb757cd839d1ff8bc5aef286226

This is what it looks in game:
https://gyazo.com/e6e07a93b7b9a81fe55480734681218c

I also tried simply loading it by replacing the idle animation with my animation, it’s clearly the animation’s problem?
https://gyazo.com/ec7aaf48e57660082b2d9a3dee1c3966

This only happen to this animation, other shotguns that I made are working fine…

1 Like

This is the method I would use to solve this.
Alternatively, you could set the animation to loop, and then use animtrack:stop to stop the animation whenever the player has finished reloading. Make sure to set the priority above core, though.

3 Likes