how to make a gun stay in the same position when you turn the fps controller up

i have an fps cantroller with a gun model attached, whenever i look up the gun moves away from the camera and when i look forwards again it goes normal. the same thing happens if i look down. does anyone know how to fix this?

Child the gun to the fps camera, not to the fps controller itself.