RobloxScripterAI
Discord ↗
Link Copied to Clipboard
×
"make a nice loading screen gui with instruction on where to insert the code"
To create a nice loading screen GUI in Roblox, follow these steps: 1. In the Roblox Studio, click on the "StarterGui" in the Explorer window. 2. Right-click on "StarterGui" and select "Insert Object" > "ScreenGui". 3. Name the new ScreenGui "LoadingScreenGui". 4. Right-click on "LoadingScreenGui" and select "Insert Object" > "Frame". 5. Customize the Frame's appearance by changing its properties in the Properties window (e.g., size, position, background color, etc.). 6. Right-click on the Frame and select "Insert Object" > "TextLabel". 7. Name the TextLabel "LoadingText" and customize its appearance in the Properties window (e.g., font, text size, text color, etc.). 8. Set the Text property of the TextLabel to "Loading...". Now, to add a script that controls the loading screen, follow these steps: 1. Right-click on the "LoadingScreenGui" and select "Insert Object" > "LocalScript". 2. Name the new LocalScript "LoadingScreenScript". 3. Replace the default code in the script with the following code: ```lua local Players = game:GetService("Players") local playerGui = Players.LocalPlayer:WaitForChild("PlayerGui") local loadingScreenGui = playerGui:WaitForChild("LoadingScreenGui") local loadingText = loadingScreenGui.Frame.LoadingText -- Show the loading screen loadingScreenGui.Enabled = true -- Add a function to hide the loading screen when the game is fully loaded local function onCharacterAdded(character) character:WaitForChild("Humanoid") wait(2) -- You can adjust this wait time to control how long the loading screen is displayed loadingScreenGui.Enabled = false end -- Connect the function to the player's CharacterAdded event Players.LocalPlayer.CharacterAdded:Connect(onCharacterAdded) -- If the player's character is already in the game, call the function manually if Players.LocalPlayer.Character then onCharacterAdded(Players.LocalPlayer.Character) end ``` This script will show the loading screen when the game starts and hide it after the player's character is fully loaded. You can adjust the wait time in the script to control how long the loading screen is displayed.