mirror of
https://github.com/unixtensor/Roblox-Elevator-Game.git
synced 2025-12-18 12:11:54 +00:00
Loading gui work, needs finished
This commit is contained in:
@@ -9,11 +9,20 @@ local Players = game:GetService("Players")
|
||||
local Storage = game:GetService("ReplicatedStorage")
|
||||
|
||||
local ClientStorage = Storage:WaitForChild("Client")
|
||||
local LoadCompleted = ClientStorage:WaitForChild("LoadingComplete")
|
||||
local KeyBindsModule = require(ClientStorage:WaitForChild("KeyBinds"))
|
||||
|
||||
local Player = Players.LocalPlayer
|
||||
local PlayerGui = Player:WaitForChild("PlayerGui")
|
||||
|
||||
CoreGuis:Off()
|
||||
|
||||
--We need to wait for the game to load before spamming functionality
|
||||
repeat
|
||||
local GameIsLoaded = LoadCompleted:Invoke()
|
||||
task.wait()
|
||||
until GameIsLoaded
|
||||
|
||||
local CurrentCamera = nil
|
||||
repeat
|
||||
task.wait()
|
||||
@@ -28,17 +37,16 @@ local Crosshair = CrosshairSettings.constructor(PlayerGui)
|
||||
local function CameraBinds()
|
||||
local CameraBindMap = KeyBindsModule.constructor()
|
||||
|
||||
CameraBindMap:AddInputBegan(Enum.KeyCode.C, function()
|
||||
CameraBindMap:AddInputBegan({Enum.KeyCode.C, Enum.KeyCode.Z}, function()
|
||||
Camera:ZoomIn(Vignette, Crosshair)
|
||||
end)
|
||||
CameraBindMap:AddInputEnded(Enum.KeyCode.C, function()
|
||||
CameraBindMap:AddInputEnded({Enum.KeyCode.C, Enum.KeyCode.Z}, function()
|
||||
Camera:ZoomOut(Vignette, Crosshair)
|
||||
end)
|
||||
end
|
||||
|
||||
CoreGuis:off()
|
||||
Mouse:DisablePointer()
|
||||
Camera:FirstPerson()
|
||||
Mouse:DisablePointer()
|
||||
Crosshair:Enable()
|
||||
|
||||
CameraBinds()
|
||||
Reference in New Issue
Block a user