mirror of
https://github.com/unixtensor/Roblox-Elevator-Game.git
synced 2025-12-14 14:51:55 +00:00
Faster loading screen
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user