Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Why won't my custom loading screen load?

Instead of my custom made loading screen , I'm getting the default loading screen (the black screen, w/ info at the bottom left and pulsating "R" in bottom right)

Here's my code, and some GIFs of what should be happening

Code within a local script, within ReplicatedFirst (The ScreenGui is located within the script itself)

local RF = game:GetService("ReplicatedFirst")
RF:RemoveDefaultLoadingScreen()

local screen = script:WaitForChild("LoadingScreen"):Clone()
local frame = screen:WaitForChild("Frame")
screen.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")

while game.ContentProvider.RequestQueueSize > 0 do
	wait(2)
end

if game.ContentProvider.RequestQueueSize == 0 then
	frame:TweenPosition(UDim2.new(0, 0, 1, 0, "Out", "Quad", 1, true, nil))
	frame.Visible = false
end

GIF of normal loading screen loading

GIF of what the loading GUI looks like, and what happens

EDIT: withing isn't a word

1 comment

1

I've also been having problems with this, it's as if the method RemoveDefaultLoadingScreen has been disabled by ROBLOX. Does anyone know for sure what's up?

1 answer

On line 13 is where there is an error, you closed the UDim2.new() at the end of the Tween, instead of after the fourth value.

Fix:

local RF = game:GetService("ReplicatedFirst")
RF:RemoveDefaultLoadingScreen()

local screen = script:WaitForChild("LoadingScreen"):Clone()
local frame = screen:WaitForChild("Frame")
screen.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")

while game.ContentProvider.RequestQueueSize > 0 do
    wait(2)
end

if game.ContentProvider.RequestQueueSize == 0 then
    frame:TweenPosition(UDim2.new(0, 0, 1, 0), "Out", "Quad", 1, true, nil)
    frame.Visible = false
end

This discussion is preserved as it was. New answers, comments, and votes are closed.