Loading screen support

I was following this tutorial, and I want to remove the gray background the code gives me, and replace it with an image. How would I do this?

local PlayerGui = game.Players.LocalPlayer:WaitForChild(“PlayerGui”)

PlayerGui:SetTopbarTransparency(0)

local screen = Instance.new(“ScreenGui”)

screen.Parent = PlayerGui

local textLabel = Instance.new(“TextLabel”)

textLabel.Text = “Awakening from your Cryonic chamber”

textLabel.Size = UDim2.new(1,0,1,0)

textLabel.FontSize = Enum.FontSize.Size32

textLabel.Parent = screen

script.Parent:RemoveDefaultLoadingScreen()

local count = 0

local start = tick()

while tick() - start < 6 do

textLabel.Text = “Awakening from your Cryonic chamber” … string.rep(".",count)

count = (count + 1) % 4

wait(5)

end

screen.Parent = nil

You should add a frame object into the screengui and put the text label in there. The frame can have a different colour than grey, you need to just change it in the properties. Also You really shouldn’t use a script to create a loading gui. It is much more efficient and easy to create a loading screen buy putting a screen gui in starter gui, and putting the frame in the screen gui and putting the text in the frame. Make the frame invisible and use a script to make it visible when you need to load it.

I’ll look into making screen GUI’s properly.

1 Like

Actually putting the script and the gui on ReplicatedFirst is better because they load before everything starts to load, also it allows you to remove ROBLOX’s loading screen.

1 Like