Hello fellow developers! Figured this was pretty simple and might help someone so I hopped on and decided to write it, enjoy and report any bugs or anything of the sort in the replies!
Actual loading screen API overview: Devforum API page
First youāll need the tell roblox to disable the default loading menu, and that can be done simply with a LocalScript in ReplicatedFirst with a few lines
local ReplicatedFirst = game:GetService("ReplicatedFirst")
ReplicatedFirst:RemoveDefaultLoadingScreen()
Next weāll setup the GUIās needed for the menu, a StarterGui, a Frame, and a TextLabel (I prefer to name all my instances but it doesnt matter much for the sake of this tutorial)
You will want to set the Frameās Size to ā{1, 0},{1, 0}ā so that it fits the entire screen, and the TextLabelās Position to ā{0.4, 0},{0.85, 0}ā (This doesnt really matter, just put it where ever you want it on the Frame)
And then you can mess around with colors and the properties of the Frame & TextLabel to fit your game or whatever you want, and you should eventually end up with something resembling this
Now onto the code:
Main API being used: Devforum UserInputService Page
(UserInputService will now be referenced to as āUISā)
Now we can make a LocalScript under the TextLabel
And for code its pretty simple, when the player loads we will disable their controls, we will detect when UIS detects an input, check if its a keyboard, if it is, then we turn the GUI off and enable their controls so they can enjoy your game
And the code is pretty basic, comments should explain everything, leave a reply if you need help or are confused with anything!
local UIS = game:GetService("UserInputService") --UserInputService used for detecting inputs sent from the player
local ScreenGui = script.Parent.Parent.Parent --The GUI we will disable when the player enters an input
local Player = game:GetService("Players").LocalPlayer --The player (client) that we need to disable & enabled the controls from
local Character = Player.Character or Player.CharacterAdded:Wait() --The physical character that everyone in the game can see
local Controls = require(game.Players.LocalPlayer.PlayerScripts:WaitForChild("PlayerModule")):GetControls() --Gets the roblox controls module so we can :Eanble() and :Disable() their movement controls
Controls:Disable() --Disable the players movement controls when the player joins the game
ScreenGui.Enabled = true --Making sure that the GUI is enabled and able to be viewed when the player joins the game
UIS.InputBegan:Connect(function(input) --.InputBegan is when you press a key, move your mouse, or even press a button on your VR/Xbox controller
if input.UserInputType == Enum.UserInputType.Keyboard then --If the input is a Key, which means they pressed a key on their Keyboard
ScreenGui.Enabled = false --Disables the GUI so they can see the game
Controls:Enable() --Enables their controls so they can move around and play the game
end
end)
Have a good holiday everyone!
Edits will be spelling & grammer corrections, along with bugs and/or optimizations
Edit one: Typos and downloadable place:TheBaconHero_101's Place Number: 88 - Roblox - If this gets enough attention ill make a tutorial on how to make a keybind editor with data saving