Scene only loading if build index is 2.

I am making a multiplayer horror game, and I have came across a problem. I am currently making a map select. This is the code I am using for when you select a map.

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.EventSystems;

public class Map : MonoBehaviour, IPointerDownHandler
{
    public string thisMap;
    public void OnPointerDown(PointerEventData eventData)
    {
        Launcher.Instance.selectedMap = thisMap;
        Debug.Log("Selected " + thisMap);
    }
}

This is the code that loads the map.
PhotonNetwork.LoadLevel(selectedMap);
Now it works fine, but the only issue is it only loads the scene if the Build Index for that certain scene is 1. If it isn’t 1, it just bugs out and doesn’t load the scene. Is there any fix for this? Or is there any way for me to set the buildIndex to 1?

(Also ignore the title, I accidentally put 2.)

You are right to need to provide a little more information. What error messages are you getting when the scene doesn’t load? Is this in build only or are you seeing this behavior in the editor too? Also, did you confirm all the scene are included in the build?

It doesn’t give me any error messages at all. It loads the scene (I know this after a bit of debugging because if I go to scene view the scene is loaded) but the game screen is still stuck on the Menu Scene. It’s in both editor and build versions and all scenes are included in the build. I am still trying to find a fix for this.

Ah im so dumb! There was a line in my code that for some reason only loaded the scene if the buildIndex was 1. LMAO