I want to have a car horn on my car. I thought it'd be bast to use this script:
function Update () {
if (Input.GetKey(KeyCode.H)) {
audio.Play();
} else {
audio.Stop();
}
}
But it doesn't work; the audio just stutters. How can i get it that when you press and hold the key, the sound continues, rather that restarting itself?