mirror of
https://github.com/unixtensor/Roblox-Elevator-Game.git
synced 2025-12-14 06:41:55 +00:00
More type fixes and need to fix CoreGuis PlayerAdded
This commit is contained in:
@@ -95,7 +95,7 @@ function Actions:EnableCrouch()
|
||||
Actions.Crouching = true
|
||||
|
||||
local Easing = TweenInfo.new(Actions.CrouchSpeed, Enum.EasingStyle.Linear)
|
||||
local WalkSpeed = (self.Humanoid :: Humanoid).WalkSpeed
|
||||
local WalkSpeed = self.Humanoid.WalkSpeed
|
||||
|
||||
CrouchTween:Start(self.Humanoid, {
|
||||
HipHeight = Actions.CrouchHeight,
|
||||
@@ -108,7 +108,7 @@ function Actions:DisableCrouch()
|
||||
Actions.Crouching = false
|
||||
|
||||
local Easing = TweenInfo.new(Actions.CrouchSpeed, Enum.EasingStyle.Linear)
|
||||
local WalkSpeed = (self.Humanoid :: Humanoid).WalkSpeed
|
||||
local WalkSpeed = self.Humanoid.WalkSpeed
|
||||
|
||||
CrouchTween:Start(self.Humanoid, {
|
||||
HipHeight = Actions.StandHeight,
|
||||
|
||||
@@ -102,14 +102,14 @@ end
|
||||
function Flashlight:On()
|
||||
Flashlight.Enabled = true
|
||||
|
||||
self.ToggleSound:Play();
|
||||
self.ToggleSound:Play()
|
||||
self.SpotLight.Enabled = Flashlight.Enabled
|
||||
end
|
||||
|
||||
function Flashlight:Off()
|
||||
Flashlight.Enabled = false
|
||||
|
||||
self.ToggleSound:Play();
|
||||
self.ToggleSound:Play()
|
||||
self.SpotLight.Enabled = Flashlight.Enabled
|
||||
end
|
||||
|
||||
|
||||
@@ -68,9 +68,9 @@ Actions:Add(Enum.KeyCode.F, function(_KeyPressed)
|
||||
end
|
||||
end);
|
||||
|
||||
(Spine.Remote :: UDP).OnServerEvent:Connect(function(Messenger: Player, CameraPosition: CFrame, IsFirstPerson: boolean)
|
||||
Spine.Remote.OnServerEvent:Connect(function(Messenger: Player, CameraPosition: CFrame, IsFirstPerson: boolean)
|
||||
if Messenger.UserId == LocalPlayer.UserId then
|
||||
if Spine.Enabled then
|
||||
if SpineModule.Enabled then
|
||||
Spine:Move(CameraPosition, IsFirstPerson)
|
||||
else
|
||||
--reset
|
||||
|
||||
@@ -2,19 +2,22 @@
|
||||
--!native
|
||||
--!strict
|
||||
|
||||
local CoreGuis = {
|
||||
AllowReset = false,
|
||||
AllowEmotes = true,
|
||||
AllowBackpack = false,
|
||||
AllowPlayerList = false
|
||||
type CustomCoreGuiEnums = {Enum.CoreGuiType}
|
||||
|
||||
type Impl_Constructor = {
|
||||
|
||||
}
|
||||
CoreGuis.__index = CoreGuis
|
||||
|
||||
local CoreGuis = {}
|
||||
|
||||
CoreGuis.AllowReset = false
|
||||
CoreGuis.AllowEmotes = true
|
||||
CoreGuis.AllowBackpack = false
|
||||
CoreGuis.AllowPlayerList = false
|
||||
|
||||
local SG = game:GetService("StarterGui")
|
||||
local Players = game:GetService("Players")
|
||||
|
||||
type CustomCoreGuiEnums = {Enum.CoreGuiType}
|
||||
|
||||
local function CustomCoreGuiEnums(): CustomCoreGuiEnums
|
||||
local CoreElements = Enum.CoreGuiType:GetEnumItems()
|
||||
table.remove(CoreElements, table.find(CoreElements, Enum.CoreGuiType.All))
|
||||
@@ -53,7 +56,7 @@ function CoreGuis:Off()
|
||||
--Enable multiplayer features
|
||||
self:On()
|
||||
|
||||
local PlayerAdded --So weird...
|
||||
local PlayerAdded
|
||||
PlayerAdded = Players.PlayerAdded:Connect(function(_)
|
||||
if #Players:GetPlayers()>1 then
|
||||
self:On()
|
||||
|
||||
Reference in New Issue
Block a user