Switch Scene on Collision with a Box

Hi.
In my project I have multiple Scenes and in each scene there are two boxes, which should load the next bzw. the previous scene if the FPSController collides with one of them.

public int sceneIndex
I´ve written a Script with the functions
public void OnCollisionEnter(Collision col)
{
if(col.GameObject.name == “Player”)
{
LoadSceneByIndex(sceneIndex);
}
}

private void LoadSceneByIndex(int index)
{
SceneManager.LoadScene(index);
}

If i collide with the box, nothing hatppens. Does anybody of you find the error and/or could tell me a way how it will work?

I´m grateful for every helpful answer.

#pragma strict
//YOU MUST HAVE THIS FOR IT TO WORK
import UnityEngine.SceneManagement;

 //Put the scene place number here
 var levelToLoad = 1;
 
 //This is the on collide trigger, also must have "Is Trigger" on object.
 function OnTriggerEnter(other:Collider)
 {

 //This "Player" can be changed, if the object "player" runs into the object this code is on then the code will activate
     if(other.gameObject.name == "Player")
     {

     //This is the scene name
         SceneManager.LoadScene("Level001");
     }
 }