Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Detect when game loaded for client?

So i'm making a game obviously, and i want to have a loading screen that doesn't go way until the game is loaded, i searched this up but couldn't find a answer. Any help is appreciated!

4 comments

0

game.Loaded

0

or game:IsLoaded()

0

Depends what you want to check for? Player being fully created? Character having loaded? Assets preloading?

0

oh good point

1 answer

The method I use is to wait until the player is fully loaded. Works just fine for me.

if not game.Players.LocalPlayer.Character or not game.Players.LocalPlayer then
   character = game.Players.LocalPlayer.CharacterAdded:wait()
end

for i,v in pairs (game.Players.LocalPlayer.Character:GetChildren()) do
while v == nil do
    wait()
end
end

2 different ways ^^

2 comments

0

he said the GAME, not the PLAYER.

0

Huh? Why would you check if v == nil? GetChildren() cannot return a table with nil as one of the values.

This discussion is preserved as it was. New answers, comments, and votes are closed.