Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How can I remove a single players chat?

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 answer

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-

1 comment

0

Nice one.

This discussion is preserved as it was. New answers, comments, and votes are closed.