Oneshot only plays once?

Very simple code

    public AudioClip soundToPlay;
	public string tags;
		
	void OnCollisionEnter (Collision collision) {
    
		string[] splitTags = tags.Split(',');
		for(int i = 0; i <= splitTags.Length-1; i++)
		{
       		audio.PlayOneShot(soundToPlay);		
		}

The first collision, it plays, the second and thereafter, it does not. If I change it to audio.play() and put the audio clip in the audio source, it works fine. But I want to apply multiple audio clips to a game object this way so why is this not working? Is there a better way?

Are you sure the OnCollisionEnter calls it out properly each time?

If yes, you could try to instantiate a GameObject every time it is called, set it up with an AudioSource and a AudioClip, call it’s play and then destroy the entire gameObject after length of AudioClip.

Building your own PlayOneShot that way.