Unity 2D Bullet moving only right

Hi guys, i need a little help. I have a FlipSprite method. And i want to add bullets to my game. When im shooting right, its fine, but i can’t write the code to flip my bullet direction. Could you guys help me what i should write to my game to work?

My FlipSprite method and the running method:

    private void FlipSprite()
    {
       bool playerHasHorizontalSpeed = Mathf.Abs(myRigidbody.velocity.x) > Mathf.Epsilon ;
        
        
        if(playerHasHorizontalSpeed == true)
        {
            //reserve the currenct scaling of x axis
   
         transform.localScale = new Vector2 (Mathf.Sign(myRigidbody.velocity.x),1f); 

        }
    }

  private void Run()
    {
        float controlThrow = CrossPlatformInputManager.GetAxis("Horizontal"); 
        Vector2 runVelocity = new Vector2(controlThrow * runSpeed, 
        myRigidbody.velocity.y);

        myRigidbody.velocity = runVelocity;
        

        bool playerHasHorizontalSpeed = Mathf.Abs(myRigidbody.velocity.x) > 
        Mathf.Epsilon; 

        myAnimator.SetBool("Running", playerHasHorizontalSpeed); 
        
    }

Plus i have two other method bullet and weapon, but these only contains like if i press left click fire, and the bullet contains rb.velocity = transform.right * speed;

I’m a bit confused but I’ll try to help you… When your sprite instantiates the bullet you may choose the orientation to give it:

Vector3 direction = Vector3.right * Mathf.sign(myRigidbody.velocity.x);
Quaternion bulletRotation = Quaternion.LookRotation(direction, Vector3.up);
Instantiate(Object bullet, Vector3 position, bulletRotation);

However I see some confusion in your code. For example, to check if playerHasHorizontalSpeed, why not writing:

bool playerHasHorizontalSpeed = myRigidbody.velocity.x != 0f;

Also, checking if a boolean equals to true is useless, you can do:

if(playerHasHorizontalSpeed){
   //some code
}

Hope that this helps!