More type fixes and need to fix CoreGuis PlayerAdded

This commit is contained in:
2024-03-09 14:06:05 -05:00
parent 04fc707bec
commit 3e28667b13
4 changed files with 21 additions and 18 deletions

View File

@@ -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,

View File

@@ -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

View File

@@ -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

View File

@@ -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()