Footstep Audio Not Working?

Hi, I’m pretty new to scripting and just using Unity in general, and I’ve actually been pretty fine until now. I’m trying to make a horror game, and as we all know, sounds are key to this genre. I’m trying to insert footsteps when the player is walking, but for some reason it’s not working. I have the script set under the player, and then an Audio Source set under the player as well with the sound “ForestFootsteps.mp3” under Audio Clip. Here’s what my script looks like:

var AudioFile : AudioClip;

function Update() 
{ 
if (Input.GetKeyDown (KeyCode.W))
{
audio.clip = AudioFile;
audio.Play();
}
else
{
audio.clip = AudioFile;
audio.Stop();
}
}

And for some reason, it’s just not working. It’s probably something stupid on my part, cause as I said I’m pretty new haha. But if someone could tell me what I’m doing wrong, or maybe even introduce a better way to script this (I know I kept it pretty basic) that’d be great. Thanks in advance!

The script

#pragma strict
 
var walk : AudioClip;
var run : AudioClip;
 
var isWalking : boolean = false;
var isRunning : boolean = false;
 
 
function Update()
{
GetState();
PlayAudio();
}
 
 
function GetState()
{
if ( Input.GetAxis( "Horizontal" ) || Input.GetAxis( "Vertical" ) )
{
if ( Input.GetKey( "left shift" ) || Input.GetKey( "right shift" ) )
{
// Running
isWalking = false;
isRunning = true;
}
else
{
// Walking
isWalking = true;
isRunning = false;
}
}
else
{
// Stopped
isWalking = false;
isRunning = false;
}
}
 
 
function PlayAudio()
{
if ( isWalking )
{
if ( audio.clip != walk )
{
audio.Stop();
audio.clip = walk;
}
 
if ( !audio.isPlaying )
{
audio.Play();
}
}
else if ( isRunning )
{
if ( audio.clip != run )
{
audio.Stop();
audio.clip = run;
}
 
if ( !audio.isPlaying )
{
audio.Play();
}
}
else
{
audio.Stop();
}
}