here is my script (its a javascript by the way) :
var Explosion : GameObject;
var Enemy : GameObject;
function OnCollisionEnter(hit : Collision)
{
if(hit == "Enemy");
{
Destroy(gameObject);
Destroy(hit.gameObject);
var effect : GameObject;
effect = Instantiate(Explosion, transform.position, transform.rotation);
}
}