Hi, I was making a loading screen, and after months of making simple loading screens, I decided I wanted to learn how to display the accurate percentage of the game being loaded in a GUI. I would like to know, is there a certain function, or method you can use to achieve this?
Based on roblox wiki, you should try to preload each asset at a time, yelding while it is loading:
-- create some sample assets local sound = Instance.new("Sound") sound.SoundId = "rbxassetid://301964312" local sound2 = Instance.new("Sound") sound2.SoundId = "rbxassetid://301964312" -- create a table of assets to be loaded local assets = { sound, sound2 } wait(3) for i = 1, #assets do local asset = assets[i] ContentProvider:PreloadAsync({asset}) -- 1 at a time, yields local progress = i / #assets bar.Size = UDim2.new(progress, 0, 1, 0) end