Here is my current script for the loading gui to be added to the players player gui.
game.Players.PlayerAdded:connect(function(Player) repeat wait() until game.ContentProvider.RequestQueueSize ~= 0 local MainMenu = game.ServerStorage.MainMenu local Clone = MainMenu:Clone() Clone.Parent = Player:WaitForChild("PlayerGui") end)
And since I have a lot of image labels I need them to be preloaded without buffering in the beginning. So I used this method but it still doesn't work well.
local ContentProvider = Game:GetService("ContentProvider") local function LoadAssets(AssetList) -- Takes an asset list and preloads it. Will not wait for them to load. for _, AssetId in pairs(AssetList) do ContentProvider:Preload("http://www.roblox.com/asset/?id=" .. AssetId) end end LoadAssets({2253543, 2434541, 5133543, 2423433, 41143243, 2453865, 21433365, 2154549})
Any help? Very appreciated