Lvl Script change question.

Well anyway I'm new to scripting and I wrote this code, but it does not seem to work and I don't get any error with either. Can someone tell me what wrong with it.

function OnControllerColliderHit(hit: ControllerColliderHit)
    {
    if (hit.gameObject.tag == "cube")
       {
           Application.LoadLevel(1);
       }
    }

Well you could try this piece of script:

function OnTriggerEnter(hit : Collider) {

if (hit.tag == "cube")
   {
       Application.LoadLevel(1);
   }
}

in order for this script to work you have to: 1. tag the cube as "cube" 2. check the "IsTrigger" button under the your type of collider the box has.