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

Tips for making an ACTUAL loading screen?

Asked by 8 years ago

So i have been noticing that in the new games that are coming to ROBLOX, they have loading screens that actually waits until everything is loaded, and not some loading screen that waits a pre selected time. Is there any references is could use to make this?

2 answers

Log in to vote
5
Answered by 8 years ago

Yep, game.ContentProvider.RequestQueueSize will give you the number of assets required to load before are able to play the game. Unfortunately, there is no way to get the initial number of assets so you just have to wing it. Here is an example (remember, this script MUST be in ReplicatedFirst and MUST be a local script.)

script.Parent:RemoveDefaultLoadingScreen()
screen=Instance.new("ScreenGui", script.Players.LocalPlayer:WaitForChild("PlayerGui"))
load=Instance.new("TextLabel", screen)
load.Size=UDim2.new(1,0,1,0)
load.TextScaled=true
while game.ContentProvider.RequestQueueSize > 0  do
    wait(0.05)
    load.Text="Loading Game: "..game.ContentProvider.RequestQueueSize
end
screen:Destroy()
script.Enabled=false
0
Oh, so i use ConentProvider. Thanks! DragonOfWar900 397 — 8y
0
Np, that's what I am here for. BobserLuck 367 — 8y
0
so i put this in... what would i put into it for the initial number of assets? coolwolf_123 0 — 5y
0
Wait, it does not really load anything because you just wait half of a millisecond then print a string returned by RequestQueueSize. Roblox loads everything by default so I don't recommend implementing such things in your addons. All this does is making it slightly heavier. LeMustage 0 — 3y
Ad
Log in to vote
-4
Answered by
Qupol -4
8 years ago

Put your script for me to see. Go to wikia to learn how if you can't script.

Answer this question