You can write your topic however you want, but you need to answer these questions:
-
What do you want to achieve?
I’m trying to create a custom loading screen for my game. -
What is the issue? Include screenshots / videos if possible!
It works, but the asset loader stops loading after it reaches around 1,800 assets -
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
I’ve tried searching for solutions, but couldn’t find any
After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!
local contentProvider = game:GetService("ContentProvider")
local ui = script:WaitForChild("LoadingScreen"):Clone()
repeat wait() until game:IsLoaded()
local assets = game:GetDescendants()
local maxAssets = #assets
local plr = game.Players.LocalPlayer
local plrGui = plr:WaitForChild("PlayerGui")
ui.Parent = plrGui
for i, assetToLoad in assets do
contentProvider:PreloadAsync({assetToLoad})
ui:WaitForChild("Frame"):WaitForChild("TextLabel").Text = i.."/"..maxAssets.." LOADED"
end
wait(1)
ui:Destroy()
Please do not ask people to write entire scripts or design entire systems for you. If you can’t answer the three questions above, you should probably pick a different category.