Speech Problem

Guys please help me , i have a problem
the problem is

When i go to the assigned character and touches it, it spams the audio and lags everything whereas if i am away from him,it work fine
For example
IIII(is my character)
OOO(is the assigned character)

so when i am like

III OOO (it works fine)

nut when i am like

IIIOOO(it spams the audio and lags everything)

here’s my script

#pragma strict
var VoiceToSpeak : AudioClip;
var character : Transform;
var playAudio = true;
var Distance = 10;
var DelayOfSpeaking = 10;

function Update () 
{
        var player : Vector3 = character.position;
        var moveDirection : Vector3 = player - transform.position;

        if (moveDirection.magnitude < Distance)
        {
              Play_Audio();
        }
}

function Play_Audio()
{
    if (playAudio == true);
    {
        playAudio = false;
        GetComponent.<AudioSource>().Stop();
        GetComponent.<AudioSource>().PlayOneShot(VoiceToSpeak);
        print ("audio playing");
        yield WaitForSeconds (DelayOfSpeaking);
        playAudio = true;
    }   
}

You may want to use the AudioSource itself rather than your own timing. You can check GetComponent.().isPlaying.

Sidenote: Don’t repeatedly call GetComponent - store the result. This’ll make your code a lot faster in the long run.

private var myAudio : AudioSource;
function Awake() {
myAudio = GetComponent.<AudioSource>();
}
myAudio.PlayOneShot(whatever);

I still cant figure out what you want to say
Can you just explain it

anyway thanks for the reply