Simple Button doesn't work :(

well at first this might seem like a dumb question, but i really cant find out why this isn’t working

GUILayout.BeginArea(new Rect(Screen.width / 2.5f, Screen.height / 5, Screen.width - Screen.width / 4, Screen.height - Screen.height / 5));
			GUILayout.BeginHorizontal();
			if (GUILayout.Button("Team1", Style))
			{
				Debug.Log("I Dont work :(");
				GameObject.Find(PlayerPrefs.GetString("Name")).transform.FindChild ("PlayerNameLobby").tag = "RedTeam";
			}
			/*foreach (string PlayerNames in NameList)
			{
				GUILayout.Label (PlayerNames, Style);
			}*/
			if (GUILayout.Button("Team2", Style))
			{
				Debug.Log("I Dont work :(");
				//GameObject.Find(PlayerPrefs.GetString("Name")).transform.FindChild ("PlayerNameLobby").tag = "BlueTeam";
			}
			/*GUILayout.Space (Screen.height / 25);
			foreach (string PlayerNames in NameList)
			{
				GUILayout.Label (PlayerNames, Style);
			}*/
			GUILayout.EndHorizontal();
			GUILayout.EndArea();

The button created is located at the right spot, its pressable but it just doesn’t give me the log command or any other sign of it working. Its not because of the style since i also tried it without the style.

Without the full code this is hard to tell, but I tried it like this and it works perfectly for me. Simply put this code at the same level as the Start() or Update() functions :

	void OnGUI(){

		GUILayout.BeginArea(new Rect(Screen.width / 2.5f, Screen.height / 5, Screen.width - (Screen.width / 4), Screen.height - (Screen.height / 5)));

		GUILayout.BeginHorizontal();

		if (GUILayout.Button("Hello"))
		{
				Debug.Log("I do work ;D");
		}

		GUILayout.EndHorizontal();

		GUILayout.EndArea();
	}

Then you should be careful with the constructors of the GUILayout.Button(). There are 6 different ways to do it ;D

Hope that helps