bullet destroy on collison

after adding in the ‘Destroy(gameObject);’ line to destroy the bullet after colliding with a wall for example the enemy will not shoot. Any ideas as to why?

bullet script:

var Dammage = 50;

function OnCollisionEnter (info : Collision)
{
	info.transform.SendMessage("ApplyDammage1", Dammage, 
	SendMessageOptions.DontRequireReceiver);
	Destroy(gameObject);
}

function Update () 
{
	var translation : float = Time.deltaTime * 60;
	transform.Translate(0,0,translation);
}

ai script:

var Distance;
var Target : Transform;
var ShootRange = 25.0;
var attackRange = 15.0;
var moveSpeed = 5.0;
var Damping = 6.0;
var projectile : Rigidbody;
var fireRate : float = 1;
var FireRange = 0-100;
private var nextFire : float = 0.0;
 
function Update ()
{
        Distance = Vector3.Distance(Target.position, transform.position);
       
        if (Distance < ShootRange)
        {
                GetComponent.<Renderer>().material.color = Color.yellow;
                lookAt();
        }
       
        if (Distance > ShootRange)
        {
                lookAt();
               
        }
       
        if (Distance < attackRange)
        {
                GetComponent.<Renderer>().material.color = Color.red;
                attack ();
        }
       
        if (Distance > attackRange && Time.time > nextFire )
        {
        nextFire = Time.time + fireRate;
                Instantiate(projectile, transform.position, transform.rotation);
               
        }
}
 
function lookAt ()
{
        var rotation = Quaternion.LookRotation(Target.position - transform.position);
       
        transform.rotation = Quaternion.Slerp(transform.rotation, rotation, Time.deltaTime * Damping);
                       
       
       
}
 
function attack ()
{
        transform.Translate(Vector3.forward * moveSpeed * Time.deltaTime);
}

have you checked that the bullets are not colliding with something when you shoot them ?

may be the gun or the character itself ?

if you spawn the bullet and it detect a collider then it’ll be destroyed.