Point custom camera at target?

I’m trying to get the xAngle and the yAngle variables to update to point towards another Humanoid but I am unsure how I can achieve this? This isn’t the full script but I know that I need to get the xAngle and yAngle to point towards the target

ContextActionService:BindAction("CameraMovement", function(ActionName, InputState, InputObject)
	xAngle = xAngle - InputObject.Delta.x * 0.4
	yAngle = math.clamp(yAngle - InputObject.Delta.y * 0.4, -75, 75)
end, false, Enum.UserInputType.MouseMovement)

i could be missing something but is there a reason you can’t just use CFrame.lookAt?

So the xAngle and yAngle is what is used to rotate the camera with the mouse for my custom over the shoulder camera. I am currently making target lock on work however when the camera unlocks from the target it returns to the position the player was looking at just before they locked on so I need to somehow update the xAngle and yAngle to also rotate towards the target but I am unsure how to achieve this