Cube travels to other cube, OnCollisionEnter, the green cube is destroyed, and should Instantiate a particle system. Everything else in the code is working but the particle system is not instantiating on impact. I have the particle system assigned correctly in the public variable in the inspector I believe.
Code:
var explosion : Transform;
var redCube : Transform;
function OnCollisionEnter() {
Destroy(gameObject);
var clonedExplosion : Transform;
clonedExplosion = Instantiate(explosion, transform.position, transform.rotation);
}
function Update (){
transform.position = Vector3.Lerp(transform.position, redCube.position, Time.time);
}
Scene/Editor:
