Why does my character move diagonally?

So i’ve been trying to make the player face towards the direction i pressed. That part works just fine but when I try to move the player it moves diagonally instead of left/right. Any clues?

      else if (Input.GetKey(KeyCode.RightArrow))
                {
                    //moves the player
                    rb2d.velocity = new Vector3(2.5f, 0, 0);
                    transform.Translate(rb2d.velocity * Time.deltaTime);
                    
                    //flips the player right
                    if (human.flipY == true)
                    {
                        human.transform.rotation = Quaternion.Euler(0, 0, 270);
                    }
                    else
                    {
                        transform.rotation = Quaternion.Euler(0, 0, -270);
                    }

@shakeearth16, Check out the documentation to Transform.Translate: the default motion is in the transforms local orientation. If you want to move left or right with respect World axes orientation, you need to specify that as a parameter in the Translate function call.