How can I get my enemy to rotate to look at my character in my 2D game??

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

157531-rotating-enemy-game-view.png

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
157532-game-view-correct.png

with just an edge looking at me

Try this:

    public Transform target;

    void Update()
    {
        transform.right = target.position - transform.position;
    }