Sound will not play in an if statement.

The sound plays fine on awake and in the update loop , however when I try to play it on a collision it will not work.

instruc9er is right, How can I pause for the length of the sound before destroying the object?

The collision is working, I don’t know how to wait for the sound to finish then destroy the object.

void OnCollisionEnter(Collision collision) {
    		if (collision.gameObject == player) {
    			switch(type) {
    			case 0: += 10;
    			case 1:

Try this instead:

if ( == {