gameObject.SetActive doesn't work?

Hello!

I want to activate a light, which doesn’t work. If I activate it in the Editor and hit the key used to activate it, it doesn’t work. But, if I deactivate it after that, it’s becoming deactivated!

Here’s my code:

#pragma strict
public var Player : Transform;
public var Flashlight : GameObject;

function Update(){

      if(Input.GetKey(KeyCode.F1)){
              Flashlight.SetActive (true);
              transform.rotation = Player.rotation;
      }
      
      if(Input.GetKey(KeyCode.F3)){
                   Flashlight.SetActive (false);
      
      }

}

Thanks for any help.
~C8002

Think this is right, but shouldn’t it be

GameObject.enabled = true

???