Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How to check if a player has finished loading?

Asked by
lucas4114 607 Moderation Voter
7 years ago

So how do I check if a player has finished loading in on this loading screen you get when you join a game: https://gyazo.com/02ae8a147bc4a1e37a5f610e06850a88

0
game.Players.PlayerAdded 0xDEADC0DE 310 — 7y
1
There is no way to tell when the players finishes this load screen. the earliest way to tell when a player connects would be to use the network replicators. Buy you can use this http://wiki.roblox.com/index.php?title=API:Class/ContentProvider/RequestQueueSize User#5423 17 — 7y

2 answers

Log in to vote
0
Answered by
Jephi 42
7 years ago
repeat wait() until game.LocalPlayers.Character

This waits forever until the LocalPlayers character model is spawned in.

Ad
Log in to vote
0
Answered by 7 years ago

Solution:

It's simple, if you want to wait until the character has been added. Just use the Character Added event! However, you need to identify the Player somehow before-hand. I have no idea what kind of script you are using but, I am going to assume you are using a Local Script.

local plr = game.Players.LocalPlayer -- Variable for player(Only used in local scripts)!

plr.CharacterAdded:connect(function(char) -- Anonymous function!
repeat wait() until char -- Repeat until statement!
-- Code
end) -- end with closing parenthesis at the end to close the Anonymous function!

More information on CharacterAdded events go here:

http://wiki.roblox.com/index.php?title=API:Class/Player/CharacterAdded

Hope I helped, and thank you for using your time to read this answer!

~~ KingLoneCat

0
So if the Player's character loaded, it mean they finished loading? The_Saver31 260 — 3y

Answer this question