Unable to add script to instantiated prefab.

In a loop I call this function:

void fire(){
Bullet = Instantiate(prefab,startingPosition,transform.rotation) as GameObject;
Bullet.rigidbody.AddForce(Vector3.Normalize(startingPosition - transform.position) * force * 100);
Bullet.AddComponent<Destruction>();}

Then I have a script (Destruction.cs):

void OnCollisionEnter(Collision col){
Destroy(this);}

The fire() function is on one set of objects and I want the Destruction.cs to be on the instantiated Bullet(prefab) objects.

My problem is that the instantiated object remains without the script even though the original prefab has the script on it! And this is the reason why I am trying to add the destruction script through AddComponent…beacuse the instantiated object does not have the script that the prefab has!

My guess is that you instantiate the prefab WITH the Destruction.cs script, but the script is Destroyed because the object collides with something.

the ‘this’ in Destroy(this) refers to the script, so if you instantiate the object with the script and it immediately collides with something, the script is destroyed. If you want to destroy the gameobject when it collides you should use Destroy(gameobject)