I have a question about object movement;

How do people program, in ROBLOX FPS games, the gun and arms moving downwards with the camera and upwards with the camera?

For example, if I move my camera up, the gun will move up with the camera sort of like a HUD element.

I'm actually not programming a gun, I just want the player to hold something in this manner.

Any help is appreciated!