I'm currently working on a top-down shooter and I want to make shotgun

I’m currently working on a top-down shooter and I want to make a shotgun but I have no idea how can I make bullet spread
these are my scripts, please forgive me if I have some big mistakes:

    public Transform firePoint;
    public GameObject bulletPrefab;
 
    public int maxAmmo = 10;
    public int currentAmmo;
    public float reloadTime = 1f;
    public bool isReloading = false;
 
    public float bulletForce = 20f;
    void Start()
    {
        currentAmmo = maxAmmo;
    }
    void Update()
    {
        if (isReloading)
            return;
        if (currentAmmo <= 0)
        {
            StartCoroutine(Reload());
            return;
        }
        if (Input.GetButtonDown("Fire1"))
        {
            Shoot();
        }
    }
    IEnumerator Reload()
    {
        isReloading = true;
        Debug.Log("Reload.....");
 
        yield return new WaitForSeconds(reloadTime);
        currentAmmo = maxAmmo;
 
        isReloading = false;
    }
 
    void Shoot()
    {
        currentAmmo--;
        GameObject bullet = Instantiate(bulletPrefab, firePoint.position, firePoint.rotation);
        Rigidbody2D rb = bullet.GetComponent<Rigidbody2D>();
        rb.AddForce(firePoint.up * bulletForce, ForceMode2D.Impulse);
    }
}

this is the bullet script:

  public Rigidbody2D rb;
    public int damage = 50;
    public float speed = 10f;
 
    private void Start()
    {
        rb.velocity = transform.up * speed;
    }
    private void OnTriggerEnter2D(Collider2D other)
    {
        Enemy enemy = other.GetComponent<Enemy>();
        Destroy(gameObject);
        if(enemy != null)
        {
            enemy.takeDamage(damage);
        }
        Debug.Log(other.gameObject);
    }
}

public class BulletSpread : MonoBehaviour
{
public GameObject bullets;
public GameObject bulletParent;
public GameObject Centre;
public float numBullets;
public float range;
// Start is called before the first frame update
void Start()
{

    }

    // Update is called once per frame
    void Update()
    {
        if (Input.GetKeyDown(KeyCode.Space))
        {
            SpreadBullets();
        }
    }
    void SpreadBullets()
    {
        for (int i = 0; i <= numBullets; i++)
        {
            bulletParent.transform.position = new Vector3(Random.Range(Centre.transform.position.x - range, Centre.transform.position.x + range), Random.Range(Centre.transform.position.y - range, Centre.transform.position.y + range));
            Instantiate(bullets, bulletParent.transform.position, bulletParent.transform.rotation);
        }
    }
}

see if that works

I still have a question

void Shoot ()
{
    currentAmmo--;
    for (int i = 0; i <= numBullets; i++)
    {
        bulletParent.transform.position = new Vector3(Random.Range(Centre.transform.position.x - range, Centre.transform.position.x + range), Random.Range(Centre.transform.position.y - range, Centre.transform.position.y + range);
        Instantiate(bullets, bulletParent.transform.position, bulletParent.transform.rotation);
    }
}

I’m not very sure why but there is an error at the end of this line

bulletParent.transform.position = new Vector3(Random.Range(Centre.transform.position.x - range, Centre.transform.position.x + range), Random.Range(Centre.transform.position.y - range, Centre.transform.position.y + range);

I’m sorry I asked this problem a week later I was a little bit busy

I still have a problem @Anonymous620 I’m sorry I found this problem very late I just tried out the script

        if (isReloading)
            return;
        if (currentAmmo <= 0)
        {
            StartCoroutine(Reload());
            return;
        }
        if (Input.GetButtonDown("Fire1"))
        {
            Shoot();
        }
    }
    IEnumerator Reload()
    {
        isReloading = true;
        Debug.Log("Reload.....");

        yield return new WaitForSeconds(reloadTime);
        currentAmmo = maxAmmo;

        isReloading = false;
    }

    void Shoot()
    {
        currentAmmo--;
        for (int i = 0; i <= numBullets; i++)
        {
            bulletParent.transform.position = new Vector3(Random.Range(Centre.transform.position.x - range, Centre.transform.position.x + range),
                Random.Range(Centre.transform.position.y - range, Centre.transform.position.y + range);
            Instantiate(bullets, bulletParent.transform.position, bulletParent.transform.rotation);
        }
    }

there is an error at end the of this line Random.Range(Centre.transform.position.y - range, Centre.transform.position.y + range);