Slight Problems with Gui Loading

So I’m making a game that loads a lot of data and assets in, and I came across a slight problem when I test in a local server. I noticed that when I first load in with the players, the guis don’t load very fast, which I thought at first was something wrong with my code.

Eventually, after a few seconds/minutes, the guis fully load in, but I think it might become a disturbance in user experience when I release the game.

My game also doesn’t have many features, just a bunch of save data to load in, so I fear that adding in more things would make the number of things to load greater, therefore, making the game look like total garbage in the first few minutes of playing.

I was wondering if there was a way to either load the game faster or have a loading screen to just make it look better when loading. I looked into some ways to make a loading screen like using :PreloadAsync() but it acts like it’s loaded completely even though it isn’t.

Do you use replicatedFirst? Also you do you have wait in your scripts?

Yes, I’ve tried putting a local script in replicatedfirst but it still says that it’s loaded when it hasn’t.

Hm that’s odd mind showing the script?

local stats = game.Players.LocalPlayer.PlayerGui:WaitForChild("Stats")

game:GetService("ContentProvider"):PreloadAsync(stats:GetDescendants())

print("Loaded")

This was the script I used to test if it was loading correctly.

When you start test mode it takes around 3 seconds to load?

I usually see the “Loaded” print right when the loading screen disappears, but the actual gui takes 1-5 minutes to load entirely.

Try to take everything from ReplicatedFirst and putting it directly into the PlayerGUI. It’s hard to really see the problem since I didn’t original make it. But if the PlayerGUI doesn’t work just come back here and we can figure it out.

I think this might actually be a studio-only thing, since it doesn’t happen when I test in main servers.

Well that’s good to know nothing is wrong with your script.