Hey, I'm trying to make a telephone ring, and when you get close to it, the ringing stops and another audio plays. I can't seem to get the audio to stop and the other audio to play like when I touch it or something else. I tried this:
function OnControllerColliderHit(hit : ControllerColliderHit)
{
if(hit.collider.gameObject.tag == "audiostart")
{
myAudioFile.Play();
}
and it says
Assets/Scripts/collisions 1.js(21,29): BCE0019: 'Play' is not a member of 'UnityEngine.AudioClip'.
Please help