How do I make two things collide? Similar to a bullet/target collision.

I have player collisions working fine, using OnControllerColliderHit, but that won’t work for the fireball that my character shoots. What do I do to make the fireball recognize a collision with an object?

Here’s my code.

var fireBall : GameObject;
var shootPoint : Transform;
var SpikeDesPrefab : GameObject;



function OnColliderHit(hit: BoxCollider){
	if(hit.gameObject.tag=="Spike") {
		Destroy(hit.gameObject);
		var instance0 : GameObject = Instantiate(SpikeDesPrefab, transform.position, transform.rotation);
		}
		}
function Update () {
transform.Translate(Vector3.forward * (Time.deltaTime*25));
}

Most of the time the bullet just goes through the object , so you should use ray casting instead

var ray = Camera.main.ScreenPointToRay (Vector2(Screen.width/2,Screen.height/2));
var hit : RaycastHit;
if(Physics.Raycast(ray,hit))
{
     if(hit.transform.tag == "enemy"){
            EnemyHit();
      }
}