Particle System not Instantiating

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:

Solved. Play on Awake for the Particle System was unchecked…

Since this thread was started, is there a way to make the original particle system not render anything in the scene? Is it possible to only have the instantiated particle systems render? I feel like if I have these hidden particle systems in the scene that are always going that is going to be really bad for performance.

1 Like