Can someone help me with some sound script problems please

So i have made a simple sound script to play a sound when i go near a door and the door opens but when i re-enter the trigger zone it restarts the sound

function OnTriggerEnter(){

If anyone could make it so the sound wont replay until it over that would be nice thanks and happy coding :smiley:

Uncheck ‘Loop’ on the AudioSource Component, or set audio.loop = false in script.