How can I make the audio play ONCE?

Hey guys, So in my game I am making AudioTriggers so when the player walks inside a trigger zone (A collider) sound plays.

@script RequireComponent(AudioSource)
var Trigger : AudioClip;

function OnTriggerEnter(){
  audio.PlayOneShot(Trigger);
}

But I only wan’t the sound to play ONCE so the player DOESN’T keep hearing the sound every time he walks into the Audio Zone.

Thank you in advance! -Izzy

Check a boolean and set it to true when OnTriggerEnter runs:

private var triggered = false;

function OnTriggerEnter() {
    if (triggered) return;
    audio.PlayOneShot(Trigger);
    triggered = true;
}