Shooting Projectiles Script supposed to delete Projectile, not the parented Particle System

I have a Projectile Script which spawns a sphere in the player camera (with Rigidbody)
I made a Prefab and this Prefab is instantiated inside the player cam every time I press LeftMouseButton
And this Prefab has 2 components: The sphere and the particle system.
The script is supposed to delete only the sphere, not the Particle System.
I wanted to stop emitting particles after the sphere is gone (so that it looks better like now), but every time the particles just disappear right when the sphere is deleted and this looks a bit weird
If you can help me solve this problem, I would be very thankful, but please keep in mind that I’m new to programming, so could you please explain it to me as newbie-style as you could (If that word even exists, but you get my point)

you can first stop the particle emitting first (ParticleSystem.Stop) first and delay for a while and delete the whole thing.

cus once you deleted the parent, all of it’s child will be deleted too.(sounds dark)

I haven’t used the ParticleSystem, so take this with a grain of salt; I presume you have attached your particle system directly to the Projectile as a prefab. When you destroy the projectile the particles are destroyed because they are attached to the destroyed object.

You want to either put the projectile in a limbo state, that the projectile is active in the scene but does not render the prefab, whilst it completes the animation. Or add the ParticleSystem as a child to the projectile and detach when the projectile is destroyed using Transform.SetParent().

dont exactly know what you mean but remember getmousedown meaning you only run it once time when you hold down your mouse.