Rotation of gameobject equal to that of the camera,Changing the X rotation of Gameobject to be equal to the camera X Rotation

I have manged to get my camera to rotate around my character but the line of sight of the character won’t change with the camera so i want to get the character to change with the camera. Please help ,I have manged to get my character to move in the direction of the line sight of the character but to change the characters line of sight based on the rotation of the camera

I am not sure, what do you actually need. But try to implement this to the camera code.