Music Zones play music with tags?

I’m trying to make music zones, enter a music zone and it will play music according to the area. I want it all in one script. I figured out how to do it with tags, but I think I’m doing it terribly wrong :(. ALSO! It’s supposed to play the music in the main camera. How can I do that?

#pragma strict

var MusicZone1Adventure : AudioClip;

function Start () {

}

function Update () {

}

function OnTriggerEnter() {
if (gameObject.tag == "MusicZone1Adventure") {
audio.PlayOneShot = MusicZone1Adventure;
}

}

Can anyone point out what I’m doing wrong? Thanks in advance!

The way that I usually do things like that i use this:

function Start () {

}

function Update () {

}

function OnTriggerEnter(hit:Collider){
if(hit.tag == "Player"){
//Whatever you need to do
}
}

Basically it activates the code as soon as anything with the Player tag hits it. so you could rig it to play the sound when the player reaches a certain point.