[c#] how to keep particles alive after destroying parent?

So i have my main object and then a particle system as a child.

On triggerEnter i want to destroy the actual main object but keep the particles until they are gone on their own

private void OnTriggerEnter(Collider other)
    {

        Destroy(this.gameObject);


    }

this is what i have so far, thanks!

About 4 hours but i did it!

Code for the actual main object:

private void OnTriggerEnter(Collider other)
    {




        transform.Find("Particles").GetComponent<DeleteAfter>().AboutToDie();
        Destroy(this.gameObject);




    }

This will activate a function inside of the child (aka the particles aka 'Particles") and the function i named DeleteAfter

This is code inside the particles:

private void Start()
    {
        StartCoroutine(Something());
    }


        public void AboutToDie()
    {
        transform.parent = null;
        GetComponent<ParticleSystem>().emissionRate = 0;
        transform.localScale = new Vector3(1, 1, 1);


    }

    IEnumerator Something()
    {

        yield return new WaitForSeconds(3.0f);
        Destroy(this.gameObject);
    }

This waits 3 seconds to fully make sure that particles are done adjust to your needs and tada!

This worked great for me, I just had to remove
transform.localScale = new Vector3(1, 1, 1);
in my case
ty