Faster loading screen

This commit is contained in:
2024-04-29 03:18:59 -04:00
parent bfab50ead3
commit 62e90a9a17
2 changed files with 2 additions and 9 deletions

View File

@@ -43,8 +43,6 @@ local Storage = game:GetService("ReplicatedStorage")
local TS = game:GetService("TestService")
local CoP = game:GetService("ContentProvider")
local LoadingFun = true
local function GuiDependencies(IntroGui: ScreenGui): GuiDependencies
IntroGui.Enabled = true
@@ -218,12 +216,7 @@ return function(IntroGui: ScreenGui, load_elapse_start: number)
if not game:IsLoaded() then
game.Loaded:Wait()
end
local load_elapse = os.clock()-load_elapse_start
if LoadingFun then
task.wait(math.max(0, 3-load_elapse)) --Only if you take longer than or exactly 4 seconds to load
end
TS:Message("Load elapse: "..tostring(load_elapse), game)
GUI_LoadFinish(Gui)

View File

@@ -24,13 +24,13 @@ local function LoadingIntroGUI()
end
local PlayerGui = Player:WaitForChild("PlayerGui")
IntroGui = PlayerGui:WaitForChild("rhpidframework_intro", 30)
IntroGui = PlayerGui:WaitForChild("rhpidframework_intro", 10)
if IntroGui then
--Let the magic begin
RunIntroGui(IntroGui, load_elapse_start)
else
warn("Waited 30 seconds for the intro gui without success")
warn("Waited 10 seconds for the intro gui without success")
end
end