Sup, I’m trying to make a Loading Screen, however sometimes the loading just gets stuck at some point for no reason, there are no errors, warnings etc. and this also doesn’t always happen.
for _, asset in pairs(AssetsToLoad) do
totalAssets += #asset:GetDescendants()
end
for _, asset in pairs(AssetsToLoad) do
if SkipLoading then break end
for _, child in pairs(asset:GetDescendants()) do
if SkipLoading then break end
AssetLabel.Text = "Asset: " .. child.Name
ContentProvider:PreloadAsync({child},
function(contentId: string, assetFetchStatus: Enum.AssetFetchStatus)
if assetFetchStatus == Enum.AssetFetchStatus.TimedOut then
warn("Timed out while preloading asset", contentId)
end
end)
assetsLoaded += 1
LoadingBar.Bar.Size =UDim2.new(assetsLoaded / totalAssets, 0, 1, 0)
AmountLabel.Text =assetsLoaded
TotalLabel.Text =totalAssets
end
end