Rotating an object based on the Camera rotation

Hi! I’m trying to rotate my main player object based on where the camera rotation, the camera rig i’m using is the Free look cam from unity’s standard assets… I have my player object and this is it’s quaternion script for rotation

		Player.rotation = Quaternion.Euler (
			new Vector3 (tiltAmountForward, wantedYRotation, tiltAmountSideways)
		);

I want to replace the WantedYRotation with one of the free camera look, i’ve tried and the player won’t rotate with it? (for example when camera is facing left or right the player is still facing straight and not also rotating left or right)

Did you try wantedYRotation as Camera.transform.rotation.eulerAngles.y?