I want to have a loading screen that closes once all the parts and decals have loaded in. I would also like to get how far it is in with a percentage but that is not the most important, how could this be done? Right now I'm just using wait for 10 seconds, sometimes that wont be long enough or be way too long. Could this be done with PrimitivesCount?
Hey, very simple to do this.
First you need a LocalScript in ReplicatedFirst that will hide the default loading screen and replace it with your own, then you simply connect to the game's Loaded event and close the GUI.
There is no surefire method of checking the percentage unless you count the loaded assets by yourself, since there is no roblox-made function for this.
PS: You can also use game:IsLoaded() to check if the game has loaded.
--localscript in replicatedfirst script.Parent:RemoveDefaultLoadingScreen() -- Remove default loading screen. -- Replace it with your own GUI here. game.Loaded:Wait() -- Connect to .Loaded event that will fire whenever the game is finished loading. --Close GUI now that loading has finished.