2DSprite axis change for child objects when flipping

Hello,
i just begin to use Unity and i am using 2D mode. I have a custom made sprite and i already made it flip when facing the opposite direction, but the problem is that, if i click the child object in the hierarchy window to see the axis, the axis does not change. I need the x axis of the child object to match the sprite facing so that it can shoot from that child object.

I watched some videos about it but couldn’t find a solution yet.

Any ideas?

Thanks in advance

Are you using SpriteRenderer.flipX or transform.localScale to flip your object? If you are using Sprite renderer that might be why your objects arent flipping with your parent object.

Here is my code
“Player” is the name of the gameobject variable i created in this script.

    public void Flip()
    {
      //float playerFaceAngle = Player.transform.eulerAngles.y;
      facingRight = !facingRight;
      //transform.eulerAngles = new Vector3(0,0,0);
       //playerFaceAngle += 180f;

      Player.transform.Rotate(Vector3.up * 180);

// = new Vector3(0,playerFaceAngle,0);

    }

When i first dragged my imported sprite into the scene it created a gameobject with a sprite renderer component, then i began to add components to that object like collider and rigidbody.
Do i need to create a new empty gameobject and parent the sprite to it?

EDIT: I tired to parent the sprite to another game object, using the same code the sprite is flipped in the scene but in the game it disappear and the axis doesn’t change so…