Ok thanks. I will do that right now.
It wont run its suspended u never started it yet
Oh so i need to start it? Ok. How do I start it? Let me check the functions in the tab menu…
coroutine.resume(newThread) This is how you start it there is no .start its resume
Ok I have done that, I will test it rn
Nope, the percentage goes to 100% and closes the gui. Let me try something that might fix it…
Make the time tick in seconds with the random number till it reaches zero
Wait how do I do that?
Wait I am trying something new where the “loading 0/[Max]” has to fill until the gui closes but the percentage goes up faster still…
local TIMERANDOMISED = math.random(1,100)
for i = 1, TIMERANDOMISED, 1 do
wait(1)
print("Timer: "..i.." Seconds Left")
end
This is a sixity second timer you can change the sixity to the timer variable
i -- This is the seconds remaining
I might aswell delete the percentage and keep the “loading 0/[max]” there… if there is a way to make it exit when they both hit 100% (for the loading thing it will be max) then I will load the backup (with the percentage and loaded thing) and use the thing…
Welp there we go, I raged, it was deleted. There is now just the “loading 0/[max]”
Well if you use the timer script i gave you you can lerp the bar to the i on the x axis you dont need to round it or anything because its every one second
No its fine now. I will just wait until I get another helper or until @uhi_o replys lol. Thanks for helping out though.
Im telling you how to improve your code and make it better than before because if you load in hundreds of assets it will be slower for other clients???
Well this topic is done now I guess.
You could use ContentProvider.RequestQueueSize to get the amount of items that are waiting to be downloaded.
Just loop through your assets
--To find total assets
local totalassets = 0 ;
for i,v in pairs(assets) do
totalassets += #v ;
end
--To calculate loaded assets
local loadedassets = 0 ;
--Your loading loop
loadedassets += 1 ;