Help with bullet collision!

Hi, i have a gun with the script playerAttack.js . When i left click with mouse i shoot a bullet in front of me. But i want this Insantiate’ed object to be destroyed when it tuch something. When it hit’s a enemy with tag"Enemy" the enemy looses help.

var Bullet : Transform;
var BulletSpeed : float = 100.0;
var BulletDamage : float = 10;


var reloadTime : float = 5;

var curHealth : int = gameObject.GetComponent(enemyHealth);

BulletSpeed = BulletSpeed * Time.deltaTime;
reloadTime = reloadTime * Time.deltaTime;

function Update ()
{


if(Input.GetMouseButtonDown(0))
    {
    var bullit = Instantiate(Bullet,GameObject.Find("spawnpoint").transform.position,Quaternion.identity);
    bullit.rigidbody.AddForce(transform.forward * 10000);
    }
    
}

function OnCollisionEnter (Bullet : Collision) {
	if(Bullet.gameObject.tag == "Enemy"){
		Destroy(gameObject.FindObjectWithTag == "bullet");
		curHealth -= 10;
	}
}

THX

Place the bullet specific collision function on a new script and assign it to the bullet. It’s the easiest way to go.

Then the bullet will not be a Prefab. Is that OK?

So the bullet that i shoot have this script code.

function OnCollisionEnter (other : Collision) {
	if(other.gameObject.tag == "Enemy"){
		Destroy(gameObject);
		curHealth -= 10;
	}
}

?