✓ Accepted answer
EDIT 1: I tried something, and I got an error.
Error:
10:17:34.271 - The current identity (2) cannot Class security check (lacking permission 6)
10:17:34.272 - Stack Begin
10:17:34.272 - Script 'Players.Maxis_s.PlayerGui.loadingGUI.bg.loadingText.LocalScript', Line 6
10:17:34.272 - Stack End
Code:
local text = script.Parent
local gameAssets = game:GetDescendants()
local CP = game:GetService("ContentProvider")
for i = 1, #gameAssets do
text.Text = "Loading Asset "..tostring(gameAssets[i]).."/"..tostring(#gameAssets)
CP:PreloadAsync({gameAssets[i]})
end
text.Text = "Loading Complete! Joining game..."
EDIT 2: I have fixed the issue, and the script now works.
Script (for anyone who wants it):
local text = script.Parent
local gameAssets = game:GetDescendants()
local CP = game:GetService("ContentProvider")
for i = 1, #gameAssets do
text.Text = "Loading Asset "..tostring(i).."/"..tostring(#gameAssets)
CP:PreloadAsync({gameAssets[i]})
end
text.Text = "Loading Complete! Joining game..."
1 comment
Nevermind, I might have found the solution. I'll write my answer if I solved it.