not sure whats wrong, my sound doesn’t play when I enter the trigger. It plays the minute I press the play button. Please Help!!
Here is my code -
private var hasPlayed : boolean = false;
var Sound : AudioClip;
function OnTriggerEnter() {
if(!hasPlayed){
audio.clip = Sound;
audio.Play();
hasPlayed = true;
}
}