fix editor entities and work on client respawning

This commit is contained in:
2024-04-23 20:01:12 -04:00
parent cb6b7eb79c
commit c6907291b4
5 changed files with 12 additions and 4 deletions

View File

@@ -25,6 +25,7 @@ type Impl_Constructor = {
__index: Impl_Constructor, __index: Impl_Constructor,
constructor: Constructor_Fun, constructor: Constructor_Fun,
--Class functions --Class functions
Spawned: (self: ClassConstructor) -> (),
CharacterKeyBinds: (self: ClassConstructor) -> (), CharacterKeyBinds: (self: ClassConstructor) -> (),
Crosshair: (self: ClassConstructor) -> RBXScriptConnection, Crosshair: (self: ClassConstructor) -> RBXScriptConnection,
SetWalkSpeed: (self: ClassConstructor) -> (), SetWalkSpeed: (self: ClassConstructor) -> (),
@@ -93,6 +94,10 @@ function CharacterModule.constructor(Character)
return setmetatable(self, CharacterModule) return setmetatable(self, CharacterModule)
end end
function CharacterModule:Spawned()
self.SpineMovement = SpineModule.constructor(self.CharacterShared, self.CurrentCamera)
end
function CharacterModule:CharacterKeyBinds() function CharacterModule:CharacterKeyBinds()
local ClientBindMap = BindModule.constructor(false) local ClientBindMap = BindModule.constructor(false)
local Actions = ActionsModule.constructor(self.CharacterShared, self.HumanoidSettings, self.CurrentCamera, self.ActionsTCP) local Actions = ActionsModule.constructor(self.CharacterShared, self.HumanoidSettings, self.CurrentCamera, self.ActionsTCP)

View File

@@ -26,6 +26,7 @@ CoreGuis.AllowBackpack = false
CoreGuis.AllowPlayerList = false CoreGuis.AllowPlayerList = false
local SG = game:GetService("StarterGui") local SG = game:GetService("StarterGui")
local RS = game:GetService("RunService")
local Players = game:GetService("Players") local Players = game:GetService("Players")
local function CustomCoreGuiEnums(): CustomCoreGuiEnums local function CustomCoreGuiEnums(): CustomCoreGuiEnums
@@ -81,7 +82,9 @@ function CoreGuis:Off()
end end
end end
ResetEnabled(CoreGuis.AllowReset) if not RS:IsStudio() then
ResetEnabled(CoreGuis.AllowReset)
end
end end
function CoreGuis:ForceOff() function CoreGuis:ForceOff()

View File

@@ -10,7 +10,7 @@ local RS = game:GetService("RunService")
--Production-- --Production--
if not RS:IsStudio() then if not RS:IsStudio() then
task.wait(.5) task.wait()
script.Parent.Parent = nil script.Parent.Parent = nil
end end
-- --

View File

@@ -113,7 +113,7 @@ function StudioEntities.indexAll(enabled: boolean)
end end
else else
for i = 1, #StudioEntities.IndexedEntities do for i = 1, #StudioEntities.IndexedEntities do
local Entity: Instance = EditorEntities[i] local Entity = EditorEntities[i]
EditorEntities[Entity.Name](Entity, enabled) EditorEntities[Entity.Name](Entity, enabled)
end end
end end

View File

@@ -2,7 +2,7 @@
--!native --!native
--!strict --!strict
local ShowEditorEntities = game:GetService("RunService"):IsStudio() local ShowEditorEntities = true
local Storage = game:GetService("ReplicatedStorage") local Storage = game:GetService("ReplicatedStorage")