Okay, since the sprite you linked (I don't see it in your comment but it was in the email sent to me) is facing to the left, you want to flip it whenever the player character is 90+ degrees away from it (positive and negative 90). If the sprite was facing to the right, you'd want to do the opposite - flip it when it was between -90 and 90 degrees.
Here is the code (note that degrees are in radians)
var angle = global_position.angle_to_point(player.global_position)
if abs(angle) > PI/2:
scale.x = -1
scale.x = 1