I am trying to make a loading screen which displays the assets loaded percentage but I feel like there is a way to shorten this, and sometimes it doesnt work (print)?
repeat wait() until script.Parent.Loading
local max = game.ContentProvider.RequestQueueSize
print("Loading")
while game.ContentProvider.RequestQueueSize > 0 do
local progress = ((-1 * game.ContentProvider.RequestQueueSize) + max)
local e = progress / max
print(game.ContentProvider.RequestQueueSize)
print(e .. "%")
wait(.1)
script.Parent.Loading.Text = "Loading Assets " .. e .. "%"
end
script.Parent.Loading.Text = "Finished!"

2 comments
It keeps printing 0% at print(e .. %)
Why the need to do all those calculations? e-e Why not just (All - Current) / All, or something like that for the calculations?