How to force camera lookat position

I am setting the position of a ‘player’ to at a spawn point, but I cannot get the player to be looking in the direction the spawn point is rotated towards. For example, if I’m looking straight down at the ground, and then suddenly set my player position to my spawn positions gameobject, and then set the rotation of my player to the spawn positions gameobject, my camera is still looking at the ground. Here is my code that does not work:

transform.FindChild("Main Camera").rotation = spawnPointLocation.rotation;

Use this Transform.LookAt