how to destroy fire ball clone? (C#)

In my game, you shoot a fireBall object by pressing ‘F’. How can I script it to, after 3 seconds, destroy a fireBall object, in order to prevent over-population of fireBall objects?

You could drop a script on the fireball prefab, with this on it:

Destroy (gameObject, 3);

This will destroy the GameObject the script is on, after 3 seconds. So: each instance of fireball, will have this script attached to it, and will destroy itself.