Issue with animating objects rigged to the player

Essentially I’m having trouble animating a sword attached to the player. The issue is that the sword rotations and movements are in the wrong directions. What could be the potential cause for this ? The sword and the rig are the exact same which I used to create the animation and all of the attachments line up.