Hello, I have been browsing the forums for an answer and I came across @MrOofBoyPlayz and it pretty much helped me in a way but there are some things I cannot figure out.
local assets1 = game.Workspace:GetDescendants()
local assets2 = game.Lighting:GetDescendants()
local assets3 = game.ReplicatedStorage:GetDescendants()
local assets4 = game.StarterGui:GetDescendants()
local assets5 = game.Players:GetDescendants()
local assets6 = game.StarterPack:GetDescendants()
local assets7 = game.Players.LocalPlayer.Character:GetDescendants()
local cp = game:GetService("ContentProvider")
local totalAssets = #assets1+#assets2+#assets3+#assets4+#assets5+#assets6+#assets7
local loaded = 0
for _, stuff in pairs(assets1) do
cp:PreloadAsync({stuff})
loaded = loaded + 1
script.Parent.Text = "Loaded "..math.floor((loaded)).."/"..math.floor((totalAssets))
end
for _, stuff in pairs(assets2) do
cp:PreloadAsync({stuff})
loaded = loaded + 1
script.Parent.Text = "Loaded "..math.floor((loaded)).."/"..math.floor((totalAssets))
end
for _, stuff in pairs(assets3) do
cp:PreloadAsync({stuff})
loaded = loaded + 1
script.Parent.Text = "Loaded "..math.floor((loaded)).."/"..math.floor((totalAssets))
end
for _, stuff in pairs(assets4) do
cp:PreloadAsync({stuff})
loaded = loaded + 1
script.Parent.Text = "Loaded "..math.floor((loaded)).."/"..math.floor((totalAssets))
end
for _, stuff in pairs(assets5) do
cp:PreloadAsync({stuff})
loaded = loaded + 1
script.Parent.Text = "Loaded "..math.floor((loaded)).."/"..math.floor((totalAssets))
end
for _, stuff in pairs(assets6) do
cp:PreloadAsync({stuff})
loaded = loaded + 1
script.Parent.Text = "Loaded "..math.floor((loaded)).."/"..math.floor((totalAssets))
end
- How do I tween a frame to expand which goes with the items being loaded?
- How do I make the GUI disappear after everything is loaded?
PS: Right now, it will load everything I have and just stay there. Like, (Loaded 1/8806 - Loaded 8806/8806)
Thank you for reading this and I hope you can help me!