Disabling Chat Issue

I am basically trying to disable the player’s chat upon joining the game and enable it later but my script to disable it is not work, I placed the script inside of StarterPlayerScripts which is located inside of a LocalScript and for some reason it won’t work. The script and output message is below;

game.Players.PlayerAdded:Connect(function(player)
	game:GetService("StarterGui"):SetCoreGuiEnabled(Enum.CoreGuiType.All, false)
end)

3 Likes

I’m pretty sure that SetCoreEnabled doesn’t work with Server scripts (correct me if I’m wrong).

1 Like

Im pretty sure it is best to disable the chat on a Client Script, inside of StarterGui.

Here is the code, for the client script:

local gui = game:GetService("StarterGui")
task.wait()
gui:SetCoreGuiEnabled(Enum.CoreGuiType.Chat, false)
3 Likes

I didn’t use a ServerScript, the script is inside of a LocalScript.

Thank you I will try it out now.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.