How to wait until game is loaded

PreloadAsnyc is for Images, Sounds, Textures, etc…

But is there a way to wait until all Frames, RemoteEvents, LocalScripts are loaded?

RequestQueueSize is bad for that, is there another way than PreloadAsync and RequestQueueSize?

game.Loaded? Its an event that fires once the entire game has downloaded

Will game.Loaded wait until RemoteEvents and all are ready to use?

Excerpt the docs:

This event fires on the client when the game finishes loading for the first time.

The Loaded event fires when all initial Instances in the game have finished replicating to the client.

Unless they are parented to ReplicatedFirst, LocalScripts will not run prior to this event firing. The following snippet, ran from a LocalScript in ReplicatedFirst, will yield until the game has loaded:

Its worth noting that scripts outside of ReplicatedFirst wont run until the entire game has loaded initially.

1 Like

Try this:

if not game:IsLoaded() then
	game.Loaded:Wait()
end
1 Like
if not game:IsLoaded() then
game.Loaded:Wait()
end

It will wait until whatever is in the game is up and loaded.

1 Like

The loading screen will automatically be removed when the character loads.

1 Like

It has nothing to do with Character, it will also remove when the Character is deactivated, im removing the Loading Screen automatically and replace it then with another Loading Screen

You can do ReplicatedFirst:RemoveDefaultLoadingScreen() if you want your own loading screen to be present.

Yeah im doing that already


This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.