Instantiate after collision

Hi, for some reason my code wont Instantiate a new gameobject after I hit it. Can someone help?

var scriptName : GameObject;
var target: GameObject;


function OnCollisionEnter(theCollision : Collision){
 
 
 
 // collision for ball destroys object
if(theCollision.gameObject.name == "BasketBall(Clone)")
{

	scriptName.GetComponent(Jh_Score_Script).addsometoscore();
	Destroy(gameObject);
	yield WaitForSeconds(1);
	Instantiate (target, Vector3(0,1,0), Quaternion.identity);
	}
	
}

For collision to occur your object needs a Collider and a Rigidbody. Without both of those “OnCollisionEnter” never triggers.

I have changed the Destroy command to Destroy(target), would this not be away around this?