Setting up a queue for multiplayer lan game


I am trying to create a networked game that is multiplayer. I do not want players in the scenes. I just want to connect scenes to one another to send data to and from each other. Ideally, I would want it to be set up in a queue, so when the local LAN host connects, they are at the first scene, the first connection would be the second scene, etc. I tried using OnStartLocalPlayer to detect when a new player has joined, Network.connections.Length to detect what number they are in the queue and LoadScene(“sceneName”, LoadScene.Single") to load a new scene for them and destroy the others that are open in the other clients. The issue is that when I open my current game, select local LAN, it goes to the right screen, but the first client to join goes straight to my online screen and does not trigger the OnStartLocalPlayer function. I made sure that the function is attached to my current player prefab but it is still only called when I initially set up the LAN host with the first scene.

Figured out the issue. I was using Network.connections which is legacy. I changed it to NetworkServer.connections.Count and it works.