how to fix aiming

hello there, I have been trying to implement aiming into my unity game and i was wondering why it didnt work. I have an aiming animation but no script attached for aiming. Here is a link to my issue

as you can see, the aiming works horizontally but the gun doesnt follow vertically. how would i fix this?

Is the gun a child of the camera? You might have it set to follow the rotation of the player, which you are rotating horizontally, but then the are rotating the camera vertically. In this case, the gun should be following the rotation of the camera, not just the player.