enable/disable halo via enable and !enable in script?

I’ve got a flashlight rigged to my player and I’ve been able to function it so i am able to toggle the spotlight on and off but to add effect in the bulb of the flashlight i added a halo but i cant seem to get it to work the same way.

the script i used was this
#pragma strict

private var flashLight : Light;


function Start ()
{
    flashLight = GetComponent(Light);
}


function Update ()
{
    if(Input.GetKeyUp("f"))//replace with right-mouse-click eventually.
    {
        flashLight.enabled =!flashLight.enabled;
       //reconfigure to allow the halo to be turned off as well.
    }
}

I’ve tried adding another var labeled Halo but it didn’t recognize it and i got a compiler error in my console. any help would be greatly appreciated.

You have to enabled directly…

GetComponent("Halo").enabled=false;