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
|
Actions.Crouching = true
|
||||||
|
|
||||||
local Easing = TweenInfo.new(Actions.CrouchSpeed, Enum.EasingStyle.Linear)
|
local Easing = TweenInfo.new(Actions.CrouchSpeed, Enum.EasingStyle.Linear)
|
||||||
local WalkSpeed = (self.Humanoid :: Humanoid).WalkSpeed
|
local WalkSpeed = self.Humanoid.WalkSpeed
|
||||||
|
|
||||||
CrouchTween:Start(self.Humanoid, {
|
CrouchTween:Start(self.Humanoid, {
|
||||||
HipHeight = Actions.CrouchHeight,
|
HipHeight = Actions.CrouchHeight,
|
||||||
@@ -108,7 +108,7 @@ function Actions:DisableCrouch()
|
|||||||
Actions.Crouching = false
|
Actions.Crouching = false
|
||||||
|
|
||||||
local Easing = TweenInfo.new(Actions.CrouchSpeed, Enum.EasingStyle.Linear)
|
local Easing = TweenInfo.new(Actions.CrouchSpeed, Enum.EasingStyle.Linear)
|
||||||
local WalkSpeed = (self.Humanoid :: Humanoid).WalkSpeed
|
local WalkSpeed = self.Humanoid.WalkSpeed
|
||||||
|
|
||||||
CrouchTween:Start(self.Humanoid, {
|
CrouchTween:Start(self.Humanoid, {
|
||||||
HipHeight = Actions.StandHeight,
|
HipHeight = Actions.StandHeight,
|
||||||
|
|||||||
@@ -102,14 +102,14 @@ end
|
|||||||
function Flashlight:On()
|
function Flashlight:On()
|
||||||
Flashlight.Enabled = true
|
Flashlight.Enabled = true
|
||||||
|
|
||||||
self.ToggleSound:Play();
|
self.ToggleSound:Play()
|
||||||
self.SpotLight.Enabled = Flashlight.Enabled
|
self.SpotLight.Enabled = Flashlight.Enabled
|
||||||
end
|
end
|
||||||
|
|
||||||
function Flashlight:Off()
|
function Flashlight:Off()
|
||||||
Flashlight.Enabled = false
|
Flashlight.Enabled = false
|
||||||
|
|
||||||
self.ToggleSound:Play();
|
self.ToggleSound:Play()
|
||||||
self.SpotLight.Enabled = Flashlight.Enabled
|
self.SpotLight.Enabled = Flashlight.Enabled
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -68,9 +68,9 @@ Actions:Add(Enum.KeyCode.F, function(_KeyPressed)
|
|||||||
end
|
end
|
||||||
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 Messenger.UserId == LocalPlayer.UserId then
|
||||||
if Spine.Enabled then
|
if SpineModule.Enabled then
|
||||||
Spine:Move(CameraPosition, IsFirstPerson)
|
Spine:Move(CameraPosition, IsFirstPerson)
|
||||||
else
|
else
|
||||||
--reset
|
--reset
|
||||||
|
|||||||
@@ -2,19 +2,22 @@
|
|||||||
--!native
|
--!native
|
||||||
--!strict
|
--!strict
|
||||||
|
|
||||||
local CoreGuis = {
|
|
||||||
AllowReset = false,
|
|
||||||
AllowEmotes = true,
|
|
||||||
AllowBackpack = false,
|
|
||||||
AllowPlayerList = false
|
|
||||||
}
|
|
||||||
CoreGuis.__index = CoreGuis
|
|
||||||
|
|
||||||
local SG = game:GetService("StarterGui")
|
|
||||||
local Players = game:GetService("Players")
|
|
||||||
|
|
||||||
type CustomCoreGuiEnums = {Enum.CoreGuiType}
|
type CustomCoreGuiEnums = {Enum.CoreGuiType}
|
||||||
|
|
||||||
|
type Impl_Constructor = {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
local CoreGuis = {}
|
||||||
|
|
||||||
|
CoreGuis.AllowReset = false
|
||||||
|
CoreGuis.AllowEmotes = true
|
||||||
|
CoreGuis.AllowBackpack = false
|
||||||
|
CoreGuis.AllowPlayerList = false
|
||||||
|
|
||||||
|
local SG = game:GetService("StarterGui")
|
||||||
|
local Players = game:GetService("Players")
|
||||||
|
|
||||||
local function CustomCoreGuiEnums(): CustomCoreGuiEnums
|
local function CustomCoreGuiEnums(): CustomCoreGuiEnums
|
||||||
local CoreElements = Enum.CoreGuiType:GetEnumItems()
|
local CoreElements = Enum.CoreGuiType:GetEnumItems()
|
||||||
table.remove(CoreElements, table.find(CoreElements, Enum.CoreGuiType.All))
|
table.remove(CoreElements, table.find(CoreElements, Enum.CoreGuiType.All))
|
||||||
@@ -53,7 +56,7 @@ function CoreGuis:Off()
|
|||||||
--Enable multiplayer features
|
--Enable multiplayer features
|
||||||
self:On()
|
self:On()
|
||||||
|
|
||||||
local PlayerAdded --So weird...
|
local PlayerAdded
|
||||||
PlayerAdded = Players.PlayerAdded:Connect(function(_)
|
PlayerAdded = Players.PlayerAdded:Connect(function(_)
|
||||||
if #Players:GetPlayers()>1 then
|
if #Players:GetPlayers()>1 then
|
||||||
self:On()
|
self:On()
|
||||||
|
|||||||
Reference in New Issue
Block a user