destroy gameobject on collision

i have the bullets for a gun destroying after 5 seconds but i want them to destroy when they collide with something
here’s the script so far

#pragma strict

var bullet : GameObject;

function Start () {

}

function Update () {

   
   Destroy(gameObject,5);

}

function OnCollisionEnter(collision : Collision) {

         Destroy(gameObject);






}

it destroys after 5 seconds but it does not destroy when it collides with a collider any help on what is wrong with it would be nice

There are a number of common issues to consider with this situation…
They are described here:

http://unitygems.com/mistakes1/#collision

also, take a look here:

http://docs.unity3d.com/Documentation/Components/class-BoxCollider.html

the collision matrix at the bottom should give you a pretty good idea of what combinations of objects will/won’t work

as we can see, BOTH objects will need a rigidbody here