Playing Random Audio from array?

So I’ve managed to build the array using code from the first person controller standard script in unity. However it doesn’t play the sound when I ‘void OnTriggerEnter’ the collision radius of the audio source, any suggestions?

Maybe it’s not playing because whenever you enter the trigger, as a player I presume, you return, i.e, stopping the code there. If you have a tag called “Player” on the object that enters the trigger, then you should remove the

if(collider.gameObject.tag == "Player")
{
    return;
}

Hey thanks that helped, although it didn’t let each individual clip play through its entirety before starting the next clip. There are other instances when I would like an array to only pick a sound once the player has collided with a certain area.