#Make player wait with a loading screen until everything loads in
9 messages · Page 1 of 1 (latest)
local contentToLoad = {table.unpack(game.ReplicatedStorage:GetDescendants()), table.unpack(game.StarterGui:GetChildren())}
local loadedCount = 0
task.wait(1)
contentProvider:PreloadAsync(contentToLoad, function(id, success)
loadedCount = math.clamp(loadedCount + 1, 0, contentProvider.RequestQueueSize + loadedCount)
loadinScreen.Bar.Frame.Size = UDim2.fromScale(loadedCount / (contentProvider.RequestQueueSize + loadedCount), 1)
end)
copied from my own script cuz im lazy af
oh i can do the loading screen i just didnt know the function that executes when the game is fully loaded