I've tried removing the chat via PlayerGui, but it says that SetCoreGuiEnabled doesn't apply there. I've tried StarterGui, but that removes the chat from every player.
Below is the code, It's in a Local Script.
local FE = game.ReplicatedStorage:WaitForChild("FreezeEvent")
FE.OnClientEvent:Connect(function(x) -- x represents a value that tells the script if it should freeze or thaw the player.
if x == "freeze" then
plr.PlayerGui:SetCoreGuiEnabled("Chat",false) -- tried this, doesn't work.
elseif x == "thaw" then
game.StarterGui:SetCoreGuiEnabled("Chat",true) -- removes all player's chat.
end
end)

1 comment
Nice one.