Why my sound it's not attaching to my Flashlight

I have a Script attached to a simple spot light that is my flashlight, so I tried to add to my existant Flashlight Script a Sound Script, So when I press “f” the light is on and so the sound, and viceversa. Unity finds no errors, but still my sound (a click to know I turn the flashlight on) is not playing when I use “f”. I have added an audio source to the flashlight, the sound on the script and the audio source, I have clicked on Play on Awake to turn that off… Any ideas someone??:slight_smile:
My Flashlight Script (Now with audio on it, but not working:/):

var linkedLight : Light;

function Update () {
    if(Input.GetKeyDown("f")){
        linkedLight.enabled = !linkedLight.enabled;
    }
}        

var shootSound:AudioClip;

    if(Input.GetKeyDown("f")){
        audio.PlayOneShot(shootSound);
    }  
}

var linkedLight : Light;
var shootSound:AudioClip;

function Update () { 
  if(Input.GetKeyDown("f")){ 
    linkedLight.enabled = !linkedLight.enabled; 
    audio.PlayOneShot(shootSound);
  }
}

second part is not in the update

Thank you very much!, It worked!