Why does unity3D crash when starting this script in play mode?

When I click play in unity3D the engine starts my game until I press “W” key to walk forward. My goal is to use the script below to have a foot steps sound loop while “W” key is pressed.

NOTE I am not very skilled at scripting just started using unity 1 month ago.

Here’s my script:

#pragma strict
var footstepSound : AudioClip;

function Update () {
  if (Input.GetKey(KeyCode.W) && !audio.isPlaying){
    audio.clip = footstepSound;

First off, put your script in a new scene, attach it to an empty game object, add an AudioSource, drag and drop a clip onto the ‘footstepSound’ variable, and hit play. Second, the screen shot did not tell me anything. So small, it is difficult to read, but 1) I don’t see an AudioSource in the components attached to the object you selected in the Hierarchy, and 2) you don’t have a console window showing, so we cannot see what (if any) errors are in your code.