Heya. I’m honestly not sure at all how to do this. I’m a total noob.
var Sound : AudioClip;
function Update () {
if (Input.GetKeyDown("w"))
{
audio.Play(Sound);
}
if (!Input.GetKeyDown("w"))
{
audio.Stop();
}
}
Any idea how I can get this to work?
If you’re wondering, this is for a footstep sound.