PcoWSkbVqDnWTu_dm2ix
Collapse Sidebar

IsLoaded

This function returns true if the client has finished loading the game for the first time.

When all initial Instance|Instances in the game has finished replicating to the client, this function will return true.

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

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

See also

  • DataModel/Loaded, an event that fires when the game has loaded
  • Instance/WaitForChild, a function which can be used to wait for an individual Instance to replicate without having to wait for the whole game to

Returns

Return Type Summary

Whether the client has finished loading the game for the first time


Code Samples


Custom Loading Screen

This sample demonstrates a custom loading screen with a basic TextLabel. The code should be placed in a LocalScript within ReplicatedFirst. To expand on this sample with loading screen animations, see the articles/Custom Loading Screens|Custom Loading Screens article.