From 3e28667b13d9699512e8a403f24e0a89f05edca4 Mon Sep 17 00:00:00 2001 From: rhpidfyre Date: Sat, 9 Mar 2024 14:06:05 -0500 Subject: [PATCH] More type fixes and need to fix CoreGuis PlayerAdded --- src/client/Character/Client/Actions.lua | 4 +-- src/client/Character/Server/Flashlight.lua | 4 +-- src/client/Character/Server/init.server.lua | 4 +-- src/client/Player/CoreGuis.lua | 27 ++++++++++++--------- 4 files changed, 21 insertions(+), 18 deletions(-) diff --git a/src/client/Character/Client/Actions.lua b/src/client/Character/Client/Actions.lua index 6f2b6e1..0c310e8 100644 --- a/src/client/Character/Client/Actions.lua +++ b/src/client/Character/Client/Actions.lua @@ -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, diff --git a/src/client/Character/Server/Flashlight.lua b/src/client/Character/Server/Flashlight.lua index 6db91e8..2aa7f38 100644 --- a/src/client/Character/Server/Flashlight.lua +++ b/src/client/Character/Server/Flashlight.lua @@ -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 diff --git a/src/client/Character/Server/init.server.lua b/src/client/Character/Server/init.server.lua index 6aefc42..7f73d73 100644 --- a/src/client/Character/Server/init.server.lua +++ b/src/client/Character/Server/init.server.lua @@ -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 diff --git a/src/client/Player/CoreGuis.lua b/src/client/Player/CoreGuis.lua index 8aaa796..23eabf3 100644 --- a/src/client/Player/CoreGuis.lua +++ b/src/client/Player/CoreGuis.lua @@ -2,19 +2,22 @@ --!native --!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 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 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()