Chatroom get disable

I am facing into a issues that the chatroom get disable by no reason, I am not sure where the codes go wrong, so I need help for code review

1 Like

I can try to help, but first, can you elaborate on what you mean and send your script?

If you mean the chat UI I think that it can get “disabled” if the client RAM is too high. Another scenario is that a script within your game disables it manually. If it’s disabled manually then running the following code after its disable should reactivate it:

game.StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.Chat, true)

Else if it’s a RAM issue you should optimize some of your client code(or server code that performs actions that replicate to the client) that may be causing it.

I do tried disable some of service script and I found one which after disable and the chatroom back, but cause everything cannot be runned, here’s the script

local ServerScriptService = game:GetService(“ServerScriptService”)
local ReplicatedStorage = game:GetService(“ReplicatedStorage”)
local ReplicatedFirst = game:GetService(“ReplicatedFirst”)
local ServerStorage = game:GetService(“ServerStorage”)

– Dependencies
local Conf = require(ReplicatedFirst.Configurations.MainConfiguration)
local Broadcast = require(ReplicatedFirst.CoreLibraries.Broadcast)
local RECS = require(ReplicatedStorage.Libraries.RECS)
local Cmdr = require(ReplicatedStorage.Libraries.Cmdr)
local Steppers = require(ServerScriptService.Steppers)
local BT = require(ReplicatedStorage.Libraries.BT)
local PlayerBehaviorManager = require(ReplicatedStorage.PlayerBehaviorManager)

–[[
RECS
]]

local recsCore = RECS.Core.new({
RECS.BuiltInPlugins.CollectionService(),
RECS.BuiltInPlugins.ComponentChangedEvent,
})

– Register singletons
for _, instance in pairs(ServerScriptService.SingletonComponents:GetChildren()) do
recsCore:addSingleton(require(instance))
end

recsCore:registerComponentsInInstance(ReplicatedStorage.SharedComponents)
recsCore:registerComponentsInInstance(ServerScriptService.Components)
recsCore:registerSystemsInInstance(ReplicatedStorage.SharedSystems)
recsCore:registerSystemsInInstance(ServerScriptService.Systems)
recsCore:registerSteppers(Steppers)

recsCore:start()

–[[
Cmdr
]]

Cmdr:RegisterHooksIn(ServerStorage.ConsoleHooks)
Cmdr:RegisterDefaultCommands()
Cmdr.Registry:RegisterTypesIn(ServerStorage.ConsoleTypes)
Cmdr:RegisterCommandsIn(ServerStorage.ConsoleCommands)

– Set the NumberValue with the PlaceVersion, since this doesn’t replicate :cry:
ReplicatedStorage.PlaceVersion.Value = game.PlaceVersion

ReplicatedStorage.Events.PrintEvent.OnServerEvent:Connect(function(player, text)
debug.profilebegin(“ServerInitPrintEvent”)
print(player.Name, ": ", text)
debug.profileend()
end)

local DamageHandler = require(ReplicatedStorage.DamageHandler)
DamageHandler.setup()

PlayerBehaviorManager.init()

– TESTING
require(ReplicatedStorage.Libraries.BTDebugger)