Making a Shuriken Particle System Turn on and off.

Yeah, I’ve heard that the new Particle System is really hard to work…

So, I’m making the Lunar Lander game from UnityCookie’s tutorial. I have placed my four thruster particle systems on my ship, and turned the emit value to off. So now I should be able to turn the emit value on and off, right? I want to have the particle system “Emission” box to be checked when I hit the arrow keys. Here is the script I have, but it keeps giving me the “NullReferenceException: Object reference was not set up to an instance of an Object”


var leftThurster : ParticleSystem;

function Start () {
}

function Update () {

if(Input.GetAxis("Horizontal") > 0) //Pressed Right
{
	leftThurster.ParticleSystem.enableEmission = true;
}

See here: Unity - Scripting API: ParticleSystem.Stop

and your code would be

leftThurster.enableEmission = true;

And you might want to spell it

leftThruster