End game OnTriggerEnter C#

I’m tryning to end my game when the player get to a specific place in my game.

I have tried with OnTriggerEnter but doesn’t work for me. (I’m a beginner)

Here is my scipt (I have only included my code for the ‘end-game’) - I do not get any alerts in my game but nothing happens either.

public class BSs : MonoBehaviour {
public GameObject EndGame;

public GUIText scoreText;
public GUIText endOfGameText;

private bool endOfGame;

void Start (){
endOfGame = false;
endOfGameText.text = “”;
score = 0;
Debug.Log (score);
UpdateScore ();
}

public void GameOver()
{
	endOfGameText.text = "GAME OVER";
	Debug.Log ("gotya");
}

void OnTriggerEnter (Collider endgame){
	if (endgame.gameObject.tag == "Player") {
			endOfGame = true;
			GameOver();
			Application.LoadLevel(Application.loadedLevel);
			Debug.Log ("finito");
		//audio.Play();
	}
}

Thanks in advance for your time!!!

This may or may not be the cause, but I’ve never seen it done this way, but this one line here.

 Application.LoadLevel(Application.loadedLevel)

The easiest way to load a level is to do

Application.LoadLevel("YourLevelName");

Strings are much easier to use.
But I could be wrong and your way is right, just saying from my observation.

Hope that helps.