Weird animation 'cloning' bug

I ran into a weird glitch when trying to add animations to my dual wield system.

Here when I shoot the gun in my right hand for some reason the slide on the gun in the left hand also moves, even though it’s not meant to and there are no keyframes to make it do that. Anyone have any ideas how to fix this?

(same happens the other way around, if I shoot the gun in my left hand, the slide on the right one also moves)

Same happens when I play the animation on the server

1 Like

This sounds like your code is playing the gun slide animation upon shooting regardless of whether it’s the one that shot or not. You should verify if that’s the case.

No I’ve checked my code, that’s not the issue. The animation just seems to replicate onto the other gun for some reason

1 Like

Nothing happens for “some” reason though. Animations don’t have much magic going on with them.

Is the animation for the gun by itself or through the character and onto the gun?

1 Like

Through the character and onto the gun

1 Like

Are there separate animations between the left and the right weapon or is it all just one animation?

1 Like

I have separate animation files for both

1 Like

So from what I’m understanding the arm moving back and the slide are both part of the animation (lmk if that’s incorrect).

That doesn’t explain why the left arm doesn’t move back but the slide does in that clip. A video of the keyframes and animation in action within the Animation Editor might help figure it out.

I’m also still slightly inclined to believe there is another animation playing in the background. Try running this code immediately after playing the firing animation:

task.wait(0.1)
print(#character.Humanoid.Animator:GetPlayingAnimationTracks())

Make sure to replace character with the proper one

The arm movement is coded, not animated

I checked the animations that are playing and there’s only one playing at a time

image

What about the keyframes in the animation editor? Are you positive there are no keyframes within the sequence that tie it to the other gun? Are the guns linked with the Left / Right hand and not just directly jointed to the root part?

Yes, I’ve checked. The parts of the gun are joined to the arms and not to the root, and there are no keyframes in animation editor.

I ended up fixing the issue by renaming the primary gun part in the character’s left hand, cause seems as though thats what roblox got confused.

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