Play sound on collision doesn't work

This is my code (c#)

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class collidersound : MonoBehaviour {

	public AudioSource oofSource;


	// Use this for initialization
	void Start () {
		oofSource = GetComponent<AudioSource> ();	
	}
	
	// Update is called once per frame
	void Update () {
		
	}

	void OnCollisionEnter (Collision collision) {
		if (collision.gameObject.tag == "Floor") {
			oofSource.Play ();
		}
	}

}

This script throws up no errors. The problem is that nothing works. No sound is playing when it collides.

It’s really odd.

Thanks for any help in advance.

If you set the AudioSource component instance through the editor don’t try to get it again. Delete the entire Start(); method

If you have a repository of the project you can give me that and I can check it out to try