How to make a object move when looking around

Hey, I want to make a flashlight move up and down with a character. And been trying a lot of things, but can seem to find to fix it. Here is a video:

If someone knows how to fix it please tell me and thx.