2D Game, i need to make an AI for the enemy to walk towards the player without rotating

I’m making a 2D game where it’s like you’re looking down on an angle at the game, so the player’s side on but you can move up, down left and right. I need the enemy to have an AI to walk towards the player, but without rotating so he’s still standing up.

i use this for my game not sure if this is what you want

public PlayerController thePlayer;
    
transform.position = Vector3.MoveTowards (transform.position, thePlayer.transform.position, Time.deltaTime * move_speed);

this script will make the object that has it attactched move towards the player constantly