How to script this Loading screen load and then have a play button?

Hi Developers, Okay so. I don’t need help making the GUI I know how to make GUI’s, so I have my GUI how would I script it to like load the assets and then wait for the GUI to transparent away, then it shows you the play button. My family members say I don’t explain well so I have some pictures to state my point.

1 Like

Try experimenting with the game.Loaded event.

2 Likes

I just found out about a service called ContentProvider. You can use its function PreloadAsync, which will wait for everything to load. I don’t really know how to make it show a fraction of loaded assets without writing a very long and complicated script though. Anyways, here’s an example of how you could use ContentProvider:

local ContentProvider = game:GetService("ContentProvider")
 
local logoId = "rbxassetid://658743164"
local pageTurnId = "rbxassetid://12222076"
 
local decal = Instance.new("Decal")
decal.Texture = logoId
 
local sound = Instance.new("Sound")
sound.SoundId = pageTurnId
 
local assets = { decal, sound }
 
ContentProvider:PreloadAsync(assets)
 
print("All assets loaded.")

So you can probably just use that code and replace that assets table with game.Workspace:GetChildren() or use a for loop to only get workspace’s children that are images/videos/sounds/etc.

Hope this helped!