How would you detect when your game is FULLY loaded?

I mean loaded when everything is in the game and nothing will fire with game.DescendantAdded unless one of my scripts creates something.

The earliest point a script can run is from ReplicatedFirst. Unfortunately it’s not really recommended to have everything loaded, as if the memory could jam when ContentProvider is doing its tasks.

Loading is replication from server to client. x.com

Also: game:IsLoaded works.

Addendum:
Client is behind in loading, it’s always before server can replicate. All depends on the machine, it’s nearly hard to detect unless you use LocalScript.

5 Likes

game:IsLoaded() is the same thing as game.Loaded. I want to know when the player is fully in the game and they are able to move and everything.

EDIT:

I want to know when ALL of these objects are loaded in.
loaded

4 Likes

If you manually spawned the player, then you would be able to know when the player is spawned in and able to move. From there to figure out if all of the objects are there. Simply check for the list of objects. If everything is there, spawn the player.

Then you know it is loaded.

2 Likes

I also want to make sure everything in CoreGui from Roblox has been loaded.

1 Like

I dug around the forum and found this topic below. The game cannot detect when CoreGui is loaded, as it seems to be running before the game do. It’s client-sided and part of the default files.

As stated before, it’s all depending on machine.

Since it’s depending on the machine, I was asking in this post if there was a way to know when the machine had loaded everything including objects inside of CoreGui (the loading screen goes away after all of those load)

If you want to check if the CoreGui has loaded you can try something like pcalling StarterGui:SetCore() or StarterGui:SetCoreGuiEnabled() and checking whether it doesn’t error about coregui stuff not being initialized/registered.

There isn’t really a way to determine a single point at which the game can be called “just loaded”, as it depends on many factors such as if the character was added, if the StarterScripts ran, if the content of Workspace has loaded, if the PlayerGui has loaded, if the CharacterAppearance has loaded, etc.

From my experience, most load screens that take place after the initial ROBLOX loadscreen tend to preload their assets (images, sounds, etc.) and log the RequestQueueSize of the ContentProvider service. From then on they incorporate how long the user has been trying to load and how much how much the RequestQueueSize has decreased in relation to the logged value. (Some force the player to wait until it hits zero.)

2 Likes

This did not work for me. In the end I created a script that waited until 4 seconds of nothing new being added to the game to conclude they are fully loaded.

16 Likes

There does not exist any API or method of determining when a game has “fully loaded”. You should not try to perform this kind of behaviour either, because long loading screens are bad for UX. You want to only load your most important assets via PreloadAsync and then initiate players into a game.

The DataModel’s Loaded property is only to signify when all instances have finished replicating to the client, so naturally it would remain independent of the loading screen. ContentProvider’s RequestQueueSize is also not an appropriate method of determining when a game has fully loaded, since it’s a dynamic property representing how many assets are left to download. This queue can change size depending on how many new assets are being introduced into the server and is also not a reliable property to utilise for loading screens.

There is also no way to interact with the CoreGui aside from the methods that Roblox explicitly exposes to interact with them (ReplicatedFirst’s RemoveDefaultLoadingScreen, StarterGui’s SetCore[GuiEnabled], etc), so trying to do anything in regards to them aside from usage of existing APIs is right out.

7 Likes

Not sure how active your game is or how many players can play, but that would be super annoying if players spawning and interacting with the game meant that I couldn’t play because the loading screen keeps detecting new instances being replicated.

3 Likes

Roblox has this loading screen and I’m trying to detect when it stops. I’m not configuring the screen in any way to make it longer.

You can’t detect when it stops. In that manner, you can’t interact with children of the CoreGui at all without using an API that facilitates this functionality (e.g. SetCore). Refer to the previous post I created.

What script did you use? (Sorry for bumping over 4 months)

Edit: sorry this was from 2019

But that does not wait for the game to be fully loaded.

1 Like

I personally use this combined with other stuff like CharacterAdded and detecting parts in workspace, Those are just workarounds since roblox doesn’t have a direct way to detect if the game fully loaded

like i would do this

local minBricksToLoad = 100

if not game.Players.LocalPlayer.Character then game.Players.LocalPlayer.CharacterAdded:Wait() end
if not game.Loaded then game.Loaded:Wait() end
-- You can filter out non parts objects if you want
while #workspace:GetDescendants() < minBricksToLoad do wait(0.1) end

-- The game is loaded, remove loading screen or do whatever you want
7 Likes

As I posted before, Loaded does not signify a full load. An experience’s environment undergoes constant replication to the client after the initial snapshot so you can’t necessarily know when an experience has “replicated everything” without making bold assumptions like the currently marked solution does. Loading doesn’t necessarily finish either because of everything that still gets replicated, either by your own actions or the engine’s, during general gameplay.

Helps to read other posts before resuggesting.

1 Like

I read the marked solution, waiting 4 seconds? what a good solution
unless you want me to scroll for every single comment which isn’t very time efficient…
Also i edited my answer on the second comment

I was referring more to my own post since someone already pointed out Loaded/IsLoaded as well as received a reply regarding using that for attempting to resolve OP’s issue.

There’s a search bar and not too many large posts here. It helps a whole lot more to read some of the discussion just so you can see what has and hasn’t been tried yet.

2 Likes