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

How do you wait until they Player is fully loaded?

Hello everyone I am trying to wait until the player has fully loaded in and can view my Intro. It needs to start as soon as the player can view their screen. Any help? I'm currently doing:

local LocalPlayer = game.Players.LocalPlayer
while LocalPlayer == nil do
  wait()
end

3 answers

✓ Accepted answer

Your problem is that you're waiting for the Player to load instead of the Character. The Player is the first thing to load in when you join a game. The other stuff like the Character and its children which is Body Parts, Accessories, Clothes, etc are what load after.

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

workspace:WaitForChild(player.Name)

--type the rest of the intro code here

2 comments

0

Bro read my question before replying with this. My code is the same as yours.

1

then could you be more clear with your question, what exactly do you mean "wait until the player has loaded in" or, "needs to start as soon as the player can view their screen"

You can just do couple of things:

local plr = game.Players.LocalPlayer
game.workspace.WaitForChild(Player.Name)
local plr = game.Players.LocalPlayer
plr:Load()
wait(5)

You can also wait until the server started up or when player is added.

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