Sound Effect Array plays all sounds when instructed to play one

I created an array to hold all of my character’s voice effects, activate a script with an onTriggerEnter event, instruct the array to play a sound based off a random int, and it plays all of them at once. I don’t know why. Please help me because this game has to get out quickly. Thanks in advance!

    private void OnTriggerEnter(Collider collision)
    {
        Player.AddForce(boostIntensity * Vector3.forward.normalized, ForceMode.VelocityChange);
        boostParticlesL.Play();
        boostParticlesR.Play();
        int sfxIndex = Random.Range(0, characterBoostSFX.Length);
        characterBoostSFX[sfxIndex].Play();
    }

Yep, the same thing is happening to me and it’s driving me crazy. I’m thinking creating GameObjects with the sound effects slapped on to them and instantiate them through a GameObject Array instead. Might share the code, if it works.

(Edit)
Turns out my problem was with the audio files themselves. Not sure it this will help you, but this is my code. :stuck_out_tongue: I think you are playing the AudioIndex rather than AudioSource itself.

void PlaySound()
        {
            myAudioSource.pitch = Random.Range(pitchMin, pitchMax);
            if (myAudioClip != null)
            {
                randomClipNumber = Random.Range(0, myAudioClip.Length);
                myAudioSource.clip = myAudioClip[randomClipNumber];
                myAudioSource.Play();
            }
            else
            {
                myAudioSource.Play();
            }
        }