Actor support

This commit is contained in:
2024-02-21 13:23:23 -05:00
parent ff16d8ceb3
commit e5f1a546b1
21 changed files with 284 additions and 73 deletions

View File

@@ -7,7 +7,7 @@ local Storage = game:GetService("ReplicatedStorage")
local LoadingFun = true
local function GuiDependencies(IntroGui: ScreenGui): typeof(GuiDependencies)
local function GuiDependencies(IntroGui: ScreenGui)
IntroGui.Enabled = true
local Frame = IntroGui:WaitForChild("Frame")
@@ -86,11 +86,10 @@ local function GUI_LoadFinish(Stepped: Stepped, Gui: GUIs) --We can now access t
Gui.IntroGui:Destroy() --We dont need the intro gui anymore
end
type GL_Cube = BasePart
type GL_Side = BasePart
type LoadFinishedSignal = RBXScriptSignal
type GL_Cube = Instance
type GL_Side = Instance
return function(IntroGui: ScreenGui, load_elapse_start: number): LoadFinishedSignal
return function(IntroGui: ScreenGui, load_elapse_start: number)
local Gui = GuiDependencies(IntroGui)
Gui.ViewportCamera.CFrame = CFrame.lookAt(Gui.GL_Cube.Position-Vector3.new(3,-2.5,5), Gui.GL_Cube.Position)
@@ -114,7 +113,6 @@ return function(IntroGui: ScreenGui, load_elapse_start: number): LoadFinishedSig
if LoadingFun then
task.wait(math.max(0, 3-load_elapse)) --Only if you take longer than or exactly 3 seconds to load
end
print(load_elapse)
GUI_LoadFinish(Stepped, Gui)
end)