I'm making a starting screen, kind of an intro, for a game. While doing it, I got into wondering what I usually wonder when doing stuff like this: how should I recognize if a player has loaded his game already or not? In this case we're talking about a situation where the player has no character. Different computers, of course, take different times to load. Adding wait()
shouldn't work that good in that case. This game is also single player if that makes your job easier at all. There's Loaded()
event for game, which could be a solution. Still, I probably have to do this to a multiplayer game in the future, so it would be good if you could provide the most information you can.
Thanks,
SwaggyDuckie
You can use the ContentProvider
to detect if the game is fully loaded for the player. Event though i'm not fully use to it, here's example which will print how long it took for the player's stuff to load :
local player = game.Players.LocalPlayer repeat wait() until player.Character local character = player.Character local before = tick(); --Preceding tick function repeat wait() until game.ContentProvider.RequestQueueSize == 0 local after = tick(); --Proceeding tick function print("It took "..after-before.."seconds to load");