I know there is a method, and it uses SetCoreGuiEnabled, but I forgot which method does that. Help?
How would I remove a player's chat from their PlayerGui?
3 answers
Go get the StarterGui and use the SetCoreGuiEnabled method. There are 2 parameters. 1 is the Type of core gui and the other is whether it is true or false.
game:GetService("StarterGui"):SetCoreGuiEnabled("Chat", false)
This would remove the chat.
TIPS
- SetCoreGuiEnabled only works(at least for me) in a LOCAL SCRIPT!
- Use Enum.CoreGuiType
Enum.CoreGuiType
It's better to use Enum, incase you make a typo. You could always do
game:GetService("StarterGui"):SetCoreGuiEnabled("Chat", false)
or
game:GetService("StarterGui"):SetCoreGuiEnabled(Enum.CoreGuiType.Chat, false)
or
game:GetService("StarterGui"):SetCoreGuiEnabled(3, false)
you can see the Enums here.
Also, remember the bar at the top of the screen, you can remove that. You cannot remove it through SetCoreGuiEnabled.
game:GetService("Players").LocalPlayer:WaitForChild('PlayerGui'):SetTopbarTransparency(1)
If you're making a custom chat thing use this Function here.
Hope this helps! (Choose mine, we're having a contest.)
You can use SetCoreGuiEnabled, which allows to hide or disable some of ROBLOX's CoreGui elements.
game.StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.Chat,false)
Here are the other CoreGui elements you can disable.
Enum.CoreGuiType.PlayerList
Enum.CoreGuiType.Health
Enum.CoreGuiType.Backpack
Enum.CoreGuiType.Chat
Enum.CoreGuiType.All
StarterGui has a method called SetCoreGuiEnabled, but it needs to be local.
--LOCAL
game:GetService('StarterGui'):SetCoreGuiEnabled('Chat', false)
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
I liked your comment, but LordDragonZord was more explanatory. Thanks anyway.