video of the problem :

need to add a flip

arms script :

public class ArmsRot : MonoBehaviour {

```
private bool m_FacingRight = true; // For determining which way the player is currently facing.
public GameObject MyPlayer;
void Update ()
{
//Arm Rotation
Vector3 difference = Camera.main.ScreenToWorldPoint (Input.mousePosition) - transform.position;
difference.Normalize ();
float rotationZ = Mathf.Atan2 (difference.y, difference.x) * Mathf.Rad2Deg;
transform.rotation = Quaternion.Euler (0f, 0f, rotationZ);
if (rotationZ < -90 || rotationZ > 90)
{
if (MyPlayer.transform.eulerAngles.y == 0)
{
transform.localRotation = Quaternion.Euler (180, 0, -rotationZ);
Flip ();
} else if (MyPlayer.transform.eulerAngles.y == 180){
transform.localRotation = Quaternion.Euler (180, 180, - rotationZ);
Flip ();
}
}
}
private void Flip()
{
// Switch the way the player is labelled as facing.
m_FacingRight = !m_FacingRight;
// Multiply the player's x local scale by -1.
Vector3 theScale = MyPlayer.transform.localScale;
theScale.x *= -1;
MyPlayer.transform.localScale = theScale;
}
```

}