Tagged Load level

i was making a game,but the load level script i was using keeps hitting other stuff

i want to be like

if you are tagged player,the load level script works:if you aren’t ,the load level script does not work

my script so far

#pragma strict

function Start () {

}

function OnTriggerEnter () {

Application.LoadLevel("MyLevel");

}

    var levelToLoad : String;
    
    function OnTriggerEnter(other : Collider)
    {
        if (other.gameObject.tag == "Player")
        {
            Application.LoadLevel(levelToLoad);
        }
    }