i have a loading script that loads all assets but i am not sure which one is better and more optimal for the game loading system
local Assets = game:GetDescendants()
for i = 1, #Assets do -- from index 1 to the last asset number, it does
local asset = Assets[i] -- here is to get the current asset loading
ContentProvider:PreloadAsync({asset})
UI1.MainFrame.LoadingText .Text = ""..i.."/"..#Assets..""
end
or
local Assets = game:GetDescendants()
for i = 1, #Assets do -- from index 1 to the last asset number, it does
local asset = Assets[i] -- here is to get the current asset loading
ContentProvider:PreloadAsync({workspace})
UI1.MainFrame.LoadingText .Text = ""..i.."/"..#Assets..""
end
the workspace one loads slower and as far as I can see it dosen’t have a difference but the assets one loads it faster and does the same thing but loads all assets in the game not just in the workspace