I have some code for making the enemy look at the character but it rotates it face to look at me

This is what it looks like in game and scene view. The characters have rotated their faces to look at me whereas i would only like their edge to look at me. This is my code:
Vector3 lookAtGoal = new Vector3(player.position.x, this.transform.position.y, player.position.z);
this.transform.LookAt(lookAtGoal);
This is how I would like it to look

with just an edge looking at me
system
3
Try this:
public Transform target;
void Update()
{
transform.right = target.position - transform.position;
}