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

What would you use to make a player who just joined wait until the world is fully loaded?

Asked by 5 years ago

It's been on my mind lately when I saw a Robloxian by the name of Nikilis who made the game called Murder Mystery 2. When you enter a server from the game, the first thing it does it is present the player with a screen gui that says that the player must wait until the world has completely loaded or until they a button appears giving them the option to skip but miss out on the unfinished textures and such. Here is a GIF of what it looks like so you don't have to investigate what I mean.

GIF: https://gyazo.com/65e989922dc9d7870c16d98a91fe118a

I am guessing it might have to do with the content provider service and the RequestQueueSize but I'm not 100% sure. It would be nice if someone can give some light on this curiosity that I have. I'm not asking for anyone to make the script for me. I just want to how Nikilis did this.

0
Yes, RequestQueueSize is the way to go. BloxRoxe 109 — 5y
0
If that is the case, how do I get the value of RequestQueueSize to print it out? Also, how do I make the player not load/spawn? Thank you for your response btw. skate992 57 — 5y
0
You can simply google it, there's a lot of information floating around. We won't spoon-feed you the code. radusavin366 617 — 5y
0
así es amigo User#19524 175 — 5y

1 answer

Log in to vote
0
Answered by 5 years ago

An easy way to make the player "wait until the world is loaded" is to, as you said, use ContentProvider.RequestQueueSize in a custom Gui object.

local CP = game:GetService("ContentProvider)
local gui = script.Parent

repeait wait() until CP.RequestQueueSize <= 0 --wait until there is nothing left to load

gui:Destroy() --stop showing the "Loading Screen"

The way this works is, the Script fetches the local ContentProvider and waits until the RequestQueueSize [which represents how much needs to load as an IntValue] is empty.

Then, script hides the GUI so that way the player can get to playing the game.


Creating a Loading Gui is rather easy. But, yes, I was once you.

Ad

Answer this question