Stop Music in other Source, help - me

I put an audio in my “Main Camera”, then created a button to stop this “audio”
How can I make a script to stop this “audio” that is “Main Camera”, when you touch that button?
I tried to do so, but it did not work

void Update () {
		if(Input.touchCount == 1)
		{
	    	var ray = Camera.main.ScreenPointToRay(Input.GetTouch(0).position);
	    	RaycastHit hit;
	    	if(Physics.Raycast(ray, out hit))
			{
				if(hit.transform.tag == "musica"){
					GameObject noMusicIns;
					audio.Stop();
					noMusicIns = (GameObject)Instantiate(noMusic, transform.position, transform.rotation);
					Destroy(gameObject);
				}
			}
		}
	}

Can anyone help me?

Are you getting any exceptions? Put some debug statements in there and post what you find.

Camera.main.audio.Stop();[/URL]

Just make sure your camera has the “MainCamera” tag.

Your “MainCamera” is static and can always be accessed by Camera.mainCamera (as long as it has that tag)

I think her issue is that she’s not even getting to the audio.Stop line, so we need more information.

Tks for Help!!