Can someone please help with this error.

I’m getting this error.

NullReferenceException: Object reference not set to an instance of an object
MenuManager.Menu_Lobby () (at Assets/Scripts/MenuManager.cs:140

Below is the part of the script the error is on (from what i gathered from the title of the error)

i just cant see anything wrong with it, can someone please help. thanks.

private void Menu_Lobby()
{
ScrollLobby = GUILayout.BeginScrollView(ScrollLobby, GUILayout.MaxWidth(200));

foreach(MPPlayer pl in MultiplayerManager.instance.PlayerList)
{
if(pl.PlayerNetwork == Network.player)
GUI.color = Color.blue;
GUILayout.Box(pl.PlayerName);
GUI.color = Color.white;
}

GUILayout.EndScrollView();

GUI.Box(new Rect(250, 10, 200, 40), MultiplayerManager.instance.CurrentMap.MapName);

if(Network.isServer)
{
if(GUI.Button(new Rect(Screen.width - 200, Screen.height - 80, 200, 40), “Start Match”))
{
MultiplayerManager.instance.networkView.RPC(“Client_LoadMultiplayerMap”, RPCMode.All, MultiplayerManager.instance.CurrentMap.MapLoadName, MultiplayerManager.instance.oldprefix + 1);
MultiplayerManager.instance.oldprefix += 1;
MultiplayerManager.instance.IsMatchStarted = true;
}
}
if(GUI.Button(new Rect(Screen.width - 200, Screen.height - 40, 200, 40), “Disconnect”))
{
Network.Disconnect();
}
}

Is the PlayerList or ScrollLobby instaniated?

yes, the error came up after i changed the scene.