fpskitv1.2 walking sound keeps going after i stand still.

Hey! I’m using FPSKITv1.2, Its a great tool the only problem im having is that when i walk there are footstep noises ofc. But the problem is the noise keeps going after i stand still so its kinda walking on the spot. Does anyone know how to fix this error?

var concrete : AudioClip;
var wood : AudioClip;
var dirt : AudioClip;
var metal : AudioClip;
private var step : boolean = true;
var audioStepLengthWalk : float = 0.45;
var audioStepLengthRun : float = 0.25;
var walkSpeed : float = 8.0;
var runSpeed : float = 12.0;

function OnCollisionStay (col : Collision) {
var controller : RigidController = GetComponent(RigidController);

if (controller.grounded && rigidbody.velocity.magnitude > (walkSpeed-2) && rigidbody.velocity.magnitude < (walkSpeed+2) && col.gameObject.tag == "Concrete" && step == true || controller.grounded && rigidbody.velocity.magnitude < (walkSpeed+2) && rigidbody.velocity.magnitude > (walkSpeed-2) && col.gameObject.tag == "Untagged" && step == true ) {
	WalkOnConcrete();
}else if (controller.grounded && rigidbody.velocity.magnitude > (runSpeed-2) && col.gameObject.tag == "Concrete" && step == true || controller.grounded && rigidbody.velocity.magnitude > (runSpeed-2) && col.gameObject.tag == "Untagged" && step == true ) {
	RunOnConcrete();
}else if (controller.grounded && rigidbody.velocity.magnitude > (walkSpeed-2) && rigidbody.velocity.magnitude < (walkSpeed+2) && col.gameObject.tag == "Wood" && step == true) {
	WalkOnWood();
}else if (controller.grounded && rigidbody.velocity.magnitude > (runSpeed-2) && col.gameObject.tag == "Wood" && step == true){
	RunOnWood();
}else if (controller.grounded && rigidbody.velocity.magnitude > (walkSpeed-2) && rigidbody.velocity.magnitude < (walkSpeed+2) && col.gameObject.tag == "Dirt" && step == true) {
	WalkOnDirt();
}else if (controller.grounded && rigidbody.velocity.magnitude > (runSpeed-2) && col.gameObject.tag == "Dirt" && step == true){
	RunOnDirt();
}else if (controller.grounded && rigidbody.velocity.magnitude > (walkSpeed-2) && rigidbody.velocity.magnitude < (walkSpeed+2) && col.gameObject.tag == "Metal" && step == true) {
	WalkOnMetal();
}else if (controller.grounded && rigidbody.velocity.magnitude > (runSpeed-2) && col.gameObject.tag == "Metal" && step == true){
	RunOnMetal();
}		

}

function WalkOnConcrete() {
step = false;
audio.clip = concrete[Random.Range(0, concrete.length)];
audio.volume = .1;
audio.Play();
yield WaitForSeconds (audioStepLengthWalk);
step = true;
}

function RunOnConcrete() {
step = false;
audio.clip = concrete[Random.Range(0, concrete.length)];
audio.volume = .3;
audio.Play();
yield WaitForSeconds (audioStepLengthRun);
step = true;
}

function WalkOnWood() {
step = false;
audio.clip = wood[Random.Range(0, wood.length)];
audio.volume = .1;
audio.Play();
yield WaitForSeconds (audioStepLengthWalk);
step = true;
}

function RunOnWood() {
step = false;
audio.clip = wood[Random.Range(0, wood.length)];
audio.volume = .3;
audio.Play();
yield WaitForSeconds (audioStepLengthRun);
step = true;
}

function WalkOnDirt() {
step = false;
audio.clip = dirt[Random.Range(0, dirt.length)];
audio.volume = .1;
audio.Play();
yield WaitForSeconds (audioStepLengthWalk);
step = true;
}

function RunOnDirt() {
step = false;
audio.clip = dirt[Random.Range(0, dirt.length)];
audio.volume = .3;
audio.Play();
yield WaitForSeconds (audioStepLengthRun);
step = true;
}

function WalkOnMetal() {
step = false;
audio.clip = metal[Random.Range(0, metal.length)];
audio.volume = .1;
audio.Play();
yield WaitForSeconds (audioStepLengthWalk);
step = true;
}

function RunOnMetal() {
step = false;
audio.clip = metal[Random.Range(0, metal.length)];
audio.volume = .3;
audio.Play();
yield WaitForSeconds (audioStepLengthRun);
step = true;
}

@script RequireComponent(AudioSource

Sorry I Couldn’t post part of it because i don’t where the error is all i know is the footsteps keep continuing after i stopped walking.

The only thing I can guess is that your sound loop continues to completion after you stop walking, since walking initiates it and when you stop walking the loop won’t line up perfectly, so it just goes to completion.

However, I am a complete n00b, so I have no idea how to fix it if this is the case, which it probably isn’t. Just my guess.