mirror of
https://github.com/unixtensor/Roblox-Elevator-Game.git
synced 2025-12-14 14:51:55 +00:00
Restructure and get a working state for the Haughton elevator
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user