Loading Screen
So you want to make a loading screen? Here!
Make a localscript in ReplicatedFirst (name it anything that you want)
Add this to the start of the localscript to remove roblox’s default screen:
By the way you cant completely remove roblox’s loading screen, but you should only see it for around 1-2 seconds.
game.ReplicatedFirst:RemoveDefaultLoadingScreen()
Then, design a loading screen! (With a screengui)
Tip: in the screengui turn on IgnoreGuiInset.
Now, put that ScreenGui inside of the localscript.
Now, add this to the next line to add a variable for the PlayerGui.
local PlayerGui = game.Players.LocalPlayer:WaitForChild("PlayerGui")
Then add this. This will add a variable for the loading screen. Then it will move it into the playergui.
local GUI = script.LoadingScreen -- Change LoadingScreen to the name of your screengui
GUI.Parent = PlayerGui
We now need to make it wait for the game to load. Add this line to make it repeat wait.
repeat wait(1) until game:IsLoaded()
After that line, it will tell the script that the game has loaded. Try tweening everything off the screen! (You should know how to tween)
(This is my script)
GUI.BG.Note:TweenPosition(UDim2.new(0.321,0,1,0), "InOut","Quart",1)
GUI.BG.Load:TweenPosition(UDim2.new(0.5,0,-1,0), "InOut","Quart",1)
wait(1)
GUI.BG.Right:TweenPosition(UDim2.new(1.25,0,0.5,0), "InOut","Quart",1)
GUI.BG.Left:TweenPosition(UDim2.new(-0.5,0,0,0), "InOut","Quart",1)
Then, make it wait a specific time for your loading screen to delete itself.
wait(1)
GUI:Destroy()
Done! You can of course add more, but thats the bare bones of a normal loading screen. Thanks for reading!
(Heres my entire script, feel free to change it if you want)
game.ReplicatedFirst:RemoveDefaultLoadingScreen()
local PlayerGui = game.Players.LocalPlayer:WaitForChild("PlayerGui")
PlayerGui:SetTopbarTransparency(0)
local GUI = script.LoadingScreen
GUI.Parent = PlayerGui
repeat wait(1) until game:IsLoaded()
GUI.BG.Note:TweenPosition(UDim2.new(0.321,0,1,0), "InOut","Quart",1)
GUI.BG.Load:TweenPosition(UDim2.new(0.5,0,-1,0), "InOut","Quart",1)
wait(1)
GUI.BG.Right:TweenPosition(UDim2.new(1.25,0,0.5,0), "InOut","Quart",1)
GUI.BG.Left:TweenPosition(UDim2.new(-0.5,0,0,0), "InOut","Quart",1)
wait(1)
GUI:Destroy()
(Some of this I used AlvinBlox’s tutorial for. Most of it is made by me)