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

How to make the LocalPlayer wait to load until contents loads?

Asked by
Ribasu 127
6 years ago
Edited 6 years ago

I don't want any player to start playing the game before my content is loaded. In other words, I want something like

LoadMyContent()
--wait to finish loading, can take 5 - 10s
spawnPlayer()`

1 answer

Log in to vote
2
Answered by
Avigant 2374 Moderation Voter Community Moderator
6 years ago

If you mean the player's character, you could turn off 'Players.CharacterAutoLoad (Wiki article), and call Player:LoadCharacter() (which must be called server-side) when your game is ready to spawn the player.

0
I turned off autoload and great, it doesn't load. Then as in the example, I've added a an event to load the character but it doesnt load, actually seems like the event never gets triggered. What's up? Ribasu 127 — 6y
0
I'm not sure, I don't know what the event you're using is and in what context. Avigant 2374 — 6y
Ad

Answer this question