Audio playing problem

So here’s my script (UnityScript):

var yourAudioClip : AudioClip;

function Update(){
if(Input.GetButtonDown)
    audio.PlayOneShot(yourAudioClip);
}

I was hoping this would let me play a sound when I press the down arrow button (the audioclip is on the same game object as this script). Instead, the audio clip is playing indefinetly without me pressing anything. Can anybody help me fix this script so that it will allow me to preform what I want? Sorry, I’m really new, so don’t be too hard on me.

Thanks, this is my script:

var yourAudioClip : AudioClip;

function Update ()

{

if(Input.GetButtonDown)

{

audio.PlayOneShot(yourAudioClip);

}

}

Thanks, this is my script:

var yourAudioClip : AudioClip;

function Update ()

{

if(Input.GetButtonDown)

{

audio.PlayOneShot(yourAudioClip);

}

}

GetButtonDown is called in the frame you press a button, as opposed to GetButtonUp, which is called when the button is released. It is not connected to the arrow keys. As it is now, it doesn’t make sense, since you don’t specify which button you want to use.

if(Input.GetKeyDown("Down"))