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

How Can I Create A Text Label That Says How Many Assets Are Left To Load?

Asked by 4 years ago

Ok, ok. I am creating a loading screen replacing Roblox's one but the only thing is that it doesn't work!

Here is my current code:

local cp = game:GetService("ContentProvider")

while cp.RequestQueueSize > 0 do
    wait(0.2)
    script.Parent.Text = "Assets To Load: "..cp.RequestQueueSize..""
end

Please help!

0
RequestQueueSize appears to be 0 for a brief time during the beginning of the game (and fluctuates a lot), so the whole while loop is probably skipped. Maybe make a minimum amount of waiting to go on to prevent this from happening. Optikk 499 — 4y

Answer this question