Locking object (or animation) to X or Y axis

This seems fairly simple, sorry if it’s been asked. Tried googling, not sure how to phrase it so Uncle Google understands.

I’ve got a sword on my character. (first person) If I look left to right the sword stays on the left side of the screen and moves with the player. (left handed) But if I look up or down, the sword disappears out of view. I figure it’s “locked” somehow to the Y axis, but not the X axis. (or vice versa, I always get those two confused. Would anyone be kind enough to tell this noob what I need to change? Thanks, and God bless.

What did you parent the sword to? Are you using the first person controller that came with unity? If so make sure you’re parenting the sword to the right object. It should be parented to the camera, not the capsule.