Audio: Playoneshot problem.

Hi, im making a game for class and im almost done. Im using Playoneshot to play audio when im moving forward and back and its replaying the audio clip every every frame, I cant seem to figure out a way to stop it, or is there a better function to use?

this is the script

if (MovingSound) 
		{
			Moving.PlayOneShot (Moving1, 0.3f);
		} else {
			Moving.Stop ();
		}

You’re probably running this code inside a recurring function, such as Update(), so it always plays a new audio shot.
AudioSources contain a variable isPlaying for this, so you can do:

 if (MovingSound && !Moving.isPlaying) 
         {
             Moving.PlayOneShot (Moving1, 0.3f);
         }