From 62e90a9a1724c7fdc46e020d26c6cdc2cbde040e Mon Sep 17 00:00:00 2001 From: unittensor Date: Mon, 29 Apr 2024 03:18:59 -0400 Subject: [PATCH] Faster loading screen --- src/load/intro/IntroGui.lua | 7 ------- src/load/intro/init.client.lua | 4 ++-- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/src/load/intro/IntroGui.lua b/src/load/intro/IntroGui.lua index f63185b..2aff547 100644 --- a/src/load/intro/IntroGui.lua +++ b/src/load/intro/IntroGui.lua @@ -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) diff --git a/src/load/intro/init.client.lua b/src/load/intro/init.client.lua index eb6f8cf..8571fe6 100644 --- a/src/load/intro/init.client.lua +++ b/src/load/intro/init.client.lua @@ -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