How can i attach a camera spring to a bone and use it to offset animation?

Well, i’m making a first person project and i’d like to attach a camera to a bone in the skeletal mesh, and as i move the camera, the bone is rotated in the animation by the same amount. So if i move the camera upwards, the bone it is attached to gets an upwards offset when an animation is played so the bone always follows the camera. i’ve already tried several combinations on the component section of the character blueprint and even some scripting to make it work but until now nothing works. Can someone help me on this?