Hi Guys,
I am an Beginner at coding and I have made a script to play a sound when the player presses W, A, S, D But I can’t seem to get the sound to repeat if the player holds the button down??? I have tried many ways but just can’t do it. Please Help
var Walk : AudioClip;
function Update () {
if (Input.GetKeyDown ("w"))
audio.Play();
if (Input.GetKeyDown ("s"))
audio.Play();
if (Input.GetKeyDown ("a"))
audio.Play();
if (Input.GetKeyDown ("d"))
audio.Play();
}