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

View File

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

View File

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

View File

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

View File

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