Restructure and get a working state for the Haughton elevator

This commit is contained in:
2024-08-13 01:45:03 -04:00
parent a1a455fb78
commit 9d081a2084
18 changed files with 96 additions and 440 deletions

View File

@@ -18,14 +18,13 @@ end
local UI = script:WaitForChild("UI")
local CrosshairSettings = require(UI:WaitForChild("Crosshair"))
local VignetteSettings = require(UI:WaitForChild("Vignette"))
local HealthSettings = require(UI:WaitForChild("Health"))
local CoreGuis = require(script:WaitForChild("CoreGuis"))
local Mouse = require(script:WaitForChild("Mouse"))
local Character = require(script:WaitForChild("Character"))
local function LoadCharacter(CharacterModel)
local CharacterConstructor = Character.constructor(CharacterModel)
CharacterConstructor:DisableRobloxSounds()
CharacterConstructor:SetWalkSpeed()
CharacterConstructor:SetJumpHeight()
@@ -61,7 +60,7 @@ local Crosshair = CrosshairSettings.constructor(PlayerGui)
--Keybinds
local function CameraBinds()
local CameraBindMap = KeyBindsModule.constructor(false)
CameraBindMap:AddInputBegan({Enum.KeyCode.C, Enum.KeyCode.Z}, function(_KeyPressed)
Camera:ZoomIn(Vignette, Crosshair)
end)
@@ -84,10 +83,9 @@ CoreGuis:Off()
Camera:FirstPerson()
Mouse:DisablePointer()
Crosshair:Enable()
HealthSettings:Enable()
CameraBinds()
Crosshair3DEffect()
LoadCharacter(PlayerCharacter)
Player.CharacterAdded:Connect(LoadCharacter)
Player.CharacterAdded:Connect(LoadCharacter)