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)
game.StarterGui:setCoreGuiEnabled("Chat",false)
is actually the solution, if it's inside of local script like it should be in your case it will only hide it for that player, I assume that you fired it to all players so that's why it's hidden for all-