So the reason why I want to do this is because the chat has no use also the reason I don't want to use local scripts is because exploiters can easily change the script so im trying to do everything on server
COMMUNITY QUESTION
How Would I disable the chat in a server script not local ?
1 answer
Modifying the client in such a way from a server script isn't possible without RemoteEvents or RemoteFunctions. The chat GUI isn't visible to the server by itself.
If you wanted the server to have any doing with disabling the chat, you could use Players.PlayerAdded to get the player you want to mute...
-- Server script
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Players = game:GetService("Players")
local Event = ReplicatedStorage:WaitForChild("RemoteEvent")
Players.PlayerAdded:Connect(function(player)
Event:FireClient(player)
end)
...and then disable chat when the event gets called.
-- LocalScript
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local StarterGui = game:GetService("StarterGui")
local Event = ReplicatedStorage:WaitForChild("RemoteEvent")
Event.OnClientEvent:Connect(function()
StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.Chat,false)
end)
But since you just want to stop a person from chatting, you might as well just call this immediately in a LocalScript in order to be more efficient.
-- LocalScript
local StarterGui = game:GetService("StarterGui")
StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.Chat,false)
3 comments
0
FE is always on. "If you enable this" makes zero sense.
0
Idiot stop being bossy ^
0
no u
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
You should refrain from doing absolutely everything with server scripts for reasons like there will be a huge amount of server lag, and some stuff like this aren't actually possible with server scripts.