how to add a sound when collecting coins?

this is my script
using UnityEngine;
using System.Collections;

public class Collectables : MonoBehaviour {
 
    public int scoreValue = 10;               // The amount added to the player's score when the collectables destroy.
	public AudioClip coinClip;              // The sound to play when the collectables destroy.
			
	AudioSource collectablesAudio;              // Reference to the audio source.

	// Use this for initialization 
 	void Start () { 
	 	 
	 } 
 
 	// Update is called once per frame 
	 	void Update () { 
	 	 
 	} 
 

 	void OnTriggerEnter2D (Collider2D other){ 
 

			if (other.tag == "Player") { 
					Destroy(gameObject); 
		
			// Increase the score by the collectables score value.
			ScoreManager.score += scoreValue;
			collectablesAudio = GetComponent <AudioSource> ();
			// Change the audio clip of the audio source to the Coin clip and play it
			collectablesAudio.clip = coinClip;
			collectablesAudio.Play ();
		    } 
	

	}
}

The GameObject is getting destroyed. The AudioSource is on the same GameObject.

@Hendrixs43

Put the code for the sound prior to the code for Destroying the object. If you Destroy it, the script will end. You should notice your score not going up either with this code.

Hope this helps! Let me know!

can you give me a sample pls @Redwolve

@Hendrixs43 i was reading your question yesterday when something interrupt me so now i also found that The GameObject is destroyed so take your Example . first make an empty game object rename it as AudioObject then attach AudioSource to it then jump to code :

public AudioClip coin;
AudioSource aScorce;
GameObject obj;
void Start(){
obj = GameObject.Find ("AudioObject");
if (obj != null)
aScorce = obj.GetComponent<AudioSource> (); // get component once @ Start more efficient.
}
  void OnTriggerEnter2D (Collider2D other){ 
         if (other.tag == "Player") {
             aScorce.clip = coin;
             aScorce.Play ();
         }
  }