Whenever I set my rifle to shoot, the particle effects are destroyed

Hey everyone, so I am working on a first person shooter and I am trying to set up the muzzle flash for my rifle, and whenever I click my right mouse button to fire the rifle, it fires once and then the particle effects disappear and I get an error message of "
The object of type ‘ParticleSystem’ has been destroyed but you are still trying to access it.
Your script should either check if it is null or you should not destroy the object."
Below I have my script and a screenshot of the Particle Effects configuration.

Here is my script

using UnityEngine;

public class Gun : MonoBehaviour {

    public float damage = 10f;
    public float range = 100f;

    public Camera fpsCam;
    public ParticleSystem muzzleFlash;
    // Update is called once per frame
    void Update() {
        if (Input.GetButtonDown("Fire1"))
        {
            Shoot();
        }
    }

    void Shoot ()
    {
        muzzleFlash.Play();
        RaycastHit hit;
        if (Physics.Raycast(fpsCam.transform.position, fpsCam.transform.forward, out hit, range))
        {
            Debug.Log(hit.transform.name);

          Target target =  hit.transform.GetComponent<Target>();
            if (target != null)
            {
                target.TakeDamage(damage);
            }
        }
    }
}

any and all help is greatly appreciated.

We will need to see more of your code, specifically TakeDamage. You are probably destroying the particlesystem object there.