CloseLoadingScreen
Ends the loading screen when the game mode keeps it up.
A server’s interface can keep the loading screen over the game past the spawn (manual_shutdown in its ui.toml’s
[components.loading]): the screen then stays until the mode’s ClosePlayerLoadingScreen, this call, the loading page’s
loading.done, or 240 seconds after the world is ready. A script that has a reason to hold it - a menu of its own that is still being built - closes it here
when it is ready. A close that comes before the player has spawned waits for the spawn.
Without that setting the spawn ends the screen and the call changes nothing, and the screen shows once for a run of the
game, so it changes nothing later either. true says the request was made; there is no answer to read beyond that -
whether the screen was still up is not reported.
Syntax
Section titled “Syntax”CloseLoadingScreen()Returns
Section titled “Returns”boolean - true when the request was made
Example
Section titled “Example”-- the mode keeps the loading screen up until its own screen is drawnfunction OnServerEvent(name, payload) if name == "menu.ready" then CloseLoadingScreen() endendSee also
Section titled “See also”OnServerEvent · the The game’s UI for a script group of the index
