Checking what side the player is for the monster

couldnt find something like that… i have made a sprite monster (2d) and i want it to turn to the player (by scaling it to its - (left and + for right).
but in order to do that right, i need the monster to know what side the player is.
:face_with_spiral_eyes:

never mind i have found the solution.
the code:

if(transform.position.x > player.transform.position.x)
{
transform.scale =  -2;
rigidbody.AddForce(right * 10);
}
else
{
transform.scale=2;
rigidbody.AddForce(left * 10);
}

because in my game, the X is right, left so if my monsters X is bigger than the players X than the player is in the left side.