How do I make a Loading Bar in unity using Photon (PUN2) 2.4?

Hey so this is the code I’ve currently got:

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using Photon.Pun;
using Photon.Realtime;
using UnityEngine.SceneManagement;

public class Launcher : MonoBehaviourPunCallbacks
{
[SerializeField]
private Button CreateNameButton;

[SerializeField]
private Slider LoadingSlider;

void Awake()
{
 PhotonNetwork.AutomaticallySyncScene = true;
}

public void loadLevels(int sceneIndex)
{
    StartCoroutine(loadSelectedScene(sceneIndex));
}

IEnumerator loadSelectedScene(int sceneIndex)
{
    
    AsyncOperation asyncOperation = PhotonNetwork.LoadLevelAsync(sceneIndex);

    while (!asyncOperation.isDone){
        float progress = Mathf.Clamp01(asyncOperation.progress / .9f);
        LoadingSlider.value = asyncOperation.progress;
        yield return null;

   }

}

}

I received the error: ‘PhotonNetwork’ does not contain a definition for ‘LoadLevelAsync’

Because PhotonNetwork.LoadLevelAsync doesn’t work anymore.
Use PhotonNetwork.LoadLevel() instead.