Destroying game objects

Hi, for some reason, I canno’t destroy a sphere, because I tried to use the function “Destroy” and the Sphere still remains on screen.

This is my function:

 private void CheckLife()
    {
        for (int i = 0; i < Particles.Count; i++)
        {
            Particle a;

            a = (Particle)Particles[i];

            a.life -= a.fade;		// Reduce Particles Life By 'Fade'

            if (a.life < 0.0f)					// If Particle Is Burned Out
            {
                Particles.RemoveAt(i);
                Destroy(a);
            }
        }
    }

Particle is a Script that is attached to a GameObject sphere.

What I’m not doing well?

Greetings

You’re calling destroy on the script, not the object. If you want the sphere to be destroyed, you need to call destroy against that – i.e. Destory(theSphereObject), not Destroy(theScriptOnTheSphere). Try ‘Destroy(a.gameObject)’ instead.

Thank you, it works!!!