So basically, what’s happening is that :PreloadAsync()
behaves really weirdly and I don’t know what I’m doing wrong
If I get a table of assets through game:GetDescendants()
, it doesn’t even dare to start up.
However, if I use game.Workspace:GetDescendants()
, it works, but after some time it gets stuck on a random asset, I tried debugging it but I never found an answer to it:
for number, asset in pairs(numberOf) do
contentProvider:PreloadAsync({asset})
local size = number / #numberOf
local tween = tweenService:Create(script.Parent.LoadingBar.Bar, TweenInfo.new(0.2, Enum.EasingStyle.Cubic, Enum.EasingDirection.InOut), {Size = UDim2.new(size, 0, 1, 0)})
funfactText.Text = funfactText:GetAttribute("Randomized").." ("..number .."/"..#numberOf..")"
tween:Play()
end