public GameObject hitEffect; GameObject effect = Instantiate(hitEffect, transform.position, Quaternion.identity); effect.GetComponent<ParticleSystem>().Play(); //Delay destruction of the effect Destroy(effect, 5f);