How to make the instantiated prefab particle play only once

Hi, I have a script that instantiates my prefab and destroys it after a few seconds and the particle plays when a boolean is equal to true the thing is when it instantiates sometimes it plays twice when the boolean switch to true twice before destroying but what I needed is to play once only before it destroys, I hope that I explain my issue well.

         if (particles != null && Gothit == tue)

if (Gothit == true)
         var particle = Instantiate(hitfx, transform.position + new Vector3(0, 0.3f, 
         0), Quaternion.identity);

        Destroy(particle, .8f);

Make sure your particle has Play On Awake (since you’re manually playing it) and Looping both set to false to make sure it only plays once and doesn’t loop. If that doesn’t work, make sure you aren’t calling the Play() method twice or instantiating it twice.

Hope this helps!