Why are my bullets not firing in the right direction? :(

Hello! So I’m currently working on a little project, and one of the mechanics concerns being able to shoot notes at enemies. However, whenever I turn to the left, my firepoint doesn’t flip. I can only fire to the right, even when I am facing the other direction.

Here is the code for PlayerMovement:

Rigidbody2D rb;
public float JumpForce;
public float MovementSpeed;
[SerializeField] GroundCheck gc;
public GameObject RayPosition;
private GameObject FirePoint;
 

// Start is called before the first frame update
void Start()
{
    rb = GetComponent<Rigidbody2D>();
}

// Update is called once per frame
void Update()
{
    float horizontalInput = (Input.GetAxisRaw("Horizontal"));//Gets Horizontal Input for player
    rb.velocity = new Vector3(horizontalInput * MovementSpeed, rb.velocity.y, 0);

    if (Input.GetKeyDown(KeyCode.Space) && gc.IsGrounded)
        rb.velocity = new Vector3 (rb.velocity.x, JumpForce, 0);

    if (horizontalInput > 0)
    {
        gameObject.transform.localScale = new Vector3(3.5f, 3.5f, 1f);
        RayPosition.transform.rotation = Quaternion.identity;
        Debug.Log("Facing Right");
    }

    if (horizontalInput < 0)
    {
        gameObject.transform.localScale = new Vector3(-3.5f, 3.5f, 1f);
        RayPosition.transform.rotation = Quaternion.Euler(0, 0, 180); 
        Debug.Log("Facing Left");
    }
   
}

HERE is the one for attacking.

public Transform FirePoint;
public GameObject NoteAttackPrefab;
public float speed = 5f;
int currentAmmo = 0;
int maxAmmo = 2;
private Transform rayPoint;
PlayerMovement pm;

private void Start()
{
    pm = GetComponent<PlayerMovement>();
}

private void Update()
{
    if (Input.GetKeyDown(KeyCode.Z)) 
    {

        Rigidbody2D rb = Instantiate(NoteAttackPrefab, FirePoint.position, FirePoint.rotation).GetComponent<Rigidbody2D>();
        rb.velocity = FirePoint.transform.right * speed;
    }

}

I’ve tried a few different things, but idk what to do. Please help, it would really be appreciated.

transform.right seems to only consider rotation, you can use playerMovement.transform.localScale.normalized to get the current direction