My particle emitter stops emitting once the W key is released but doesnt start when it is pressed again

Hi all, I am trying to get a particle emitter to fire repeatedly whenever W is pressed however once released after the first press the particle emitter refuses to fire again. Here is the code I am using (JS obviously):

function Update () {

    if (Input.GetKey (KeyCode.W))
    {
        particleEmitter.emit = true;
    }
    if (!Input.GetKey (KeyCode.W))
    {
        particleEmitter.emit = false;
    }
}

Please help!! Thanks

I guess you set Autodestruct to true at your ParticleAnimator, that will destroy the whole gameobject once the last particle have disappeared.

Thanks, that solved it.

Noobie error i'm afraid. :-)