Load New level at a specific object

Hello. I would like a new level to load when my player touches the end banner game object. But if I add an if statement in the OnTriggerEnter function it does not work. Here’s my code:

function OnTriggerEnter () 
{ 
   if(gameObject.name == "End Banner" && otherScript.restSeconds > 0) 
   {
     LevelCompleted();
   }
}

function LevelCompleted()
{
   Application.LoadLevel("Win");
}

Without more context I have no idea what your code is trying to accomplish but it seems clear that your if statement is not doing what you expect to do and is always evaluating to false. Something is wrong with the logic in your if statement.