mirror of
https://github.com/unixtensor/Roblox-Elevator-Game.git
synced 2025-12-16 07:11:54 +00:00
UDP flashlight working and fix some type errors
This commit is contained in:
@@ -9,9 +9,9 @@ local HealthSettings = require(UI:WaitForChild("Health"))
|
||||
local CoreGuis = require(script:WaitForChild("CoreGuis"))
|
||||
local Mouse = require(script:WaitForChild("Mouse"))
|
||||
|
||||
local Players = game:GetService("Players")
|
||||
local Storage = game:GetService("ReplicatedStorage")
|
||||
local RS = game:GetService("RunService") :: RunService
|
||||
local Players: Players = game:GetService("Players")
|
||||
local Storage: ReplicatedStorage = game:GetService("ReplicatedStorage")
|
||||
local RS: RunService = game:GetService("RunService")
|
||||
|
||||
local ClientStorage = Storage:WaitForChild("Client")
|
||||
local LoadCompleted = ClientStorage:WaitForChild("LoadingComplete")
|
||||
@@ -19,11 +19,11 @@ local KeyBindsModule = require(ClientStorage:WaitForChild("KeyBinds"))
|
||||
local CameraSettings = require(ClientStorage:WaitForChild("Camera"))
|
||||
|
||||
local Player = Players.LocalPlayer
|
||||
local PlayerGui = Player:WaitForChild("PlayerGui")
|
||||
local PlayerGui = Player:WaitForChild("PlayerGui") :: PlayerGui
|
||||
|
||||
--We need to wait for the game to load before spamming functionality
|
||||
repeat
|
||||
local GameIsLoaded = LoadCompleted:Invoke()
|
||||
local GameIsLoaded = (LoadCompleted :: BindableFunction):Invoke()
|
||||
task.wait()
|
||||
until GameIsLoaded
|
||||
|
||||
@@ -41,10 +41,10 @@ local Crosshair = CrosshairSettings.constructor(PlayerGui)
|
||||
local function CameraBinds()
|
||||
local CameraBindMap = KeyBindsModule.constructor(false)
|
||||
|
||||
CameraBindMap:AddInputBegan({Enum.KeyCode.C, Enum.KeyCode.Z}, function()
|
||||
CameraBindMap:AddInputBegan({Enum.KeyCode.C, Enum.KeyCode.Z}, function(_KeyPressed)
|
||||
Camera:ZoomIn(Vignette, Crosshair)
|
||||
end)
|
||||
CameraBindMap:AddInputEnded({Enum.KeyCode.C, Enum.KeyCode.Z}, function()
|
||||
CameraBindMap:AddInputEnded({Enum.KeyCode.C, Enum.KeyCode.Z}, function(_KeyPressed)
|
||||
Camera:ZoomOut(Vignette, Crosshair)
|
||||
end)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user