Door Sound Script Help

Hey I have some issues with the sound script for my door, so my door has a box collider with a trigger and it gets open with a mouse click. But i have this separate script for the door sound, and i guess it misses the ontriggerenter or something because it doesnt matter where I’m in the map, when I click, the door sound gets activated. I know it’s probably easy to fix, but I’m not too good yet in scripting. So what i want is that the sound gets activated only if the player clicked on the trigger of the door (inside the box collider); Here is the sound script:

var shootSound:AudioClip;

function Update () {
if(Input.GetKeyDown(KeyCode.Mouse0)){
audio.PlayOneShot(shootSound);
}
}

I get what you’re trying to do. Use OnMouseDown(); it’s great for non-mobile point and click games.

function OnMouseDown(){
	audio.PlayOneShot(shootSound);
}