Destroy Instantiated GameObject Problem

Ok so I’m pretty sure my problem is I’m not using the correct syntax for telling the Destroy command what to actually destroy. I’m just putting a small snippet of the script up because the rest is really unnecessary. The “shotgunShootParticle” variable is a GameObject. Really my only problem is figuring out how to destroy the instantiated object.

function Update(){
   if(Input.GetButtonDown("Fire1")){
   
   	Instantiate(shotgunShootParticle, transform.position, transform.rotation);
   	
   	Destroy(shotgunShootParticle, 1);
   	
    FireWeapon();
    
    }
    
}

Two solution to your problem:

first: When you destroy an object you need a reference, you do not have any there.

var myRef = Instantiate(shotgunShootParticle, transform.position, transform.rotation);
Destroy(myRef, 1f);

Second solution is to simply tick OneShot in the particle system. That will automatically destroy the object.If you are using shuriken tick off Looping.