Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
2

How would I remove a player's chat from their PlayerGui?

Asked by
Relatch 550 Moderation Voter
9 years ago

I know there is a method, and it uses SetCoreGuiEnabled, but I forgot which method does that. Help?

3 answers

Log in to vote
2
Answered by 9 years ago

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

  1. SetCoreGuiEnabled only works(at least for me) in a LOCAL SCRIPT!
  2. 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.)

Ad
Log in to vote
2
Answered by
ImageLabel 1541 Moderation Voter
9 years ago

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
0
I liked your comment, but LordDragonZord was more explanatory. Thanks anyway. Relatch 550 — 9y
Log in to vote
1
Answered by
W8X 95
9 years ago

StarterGui has a method called SetCoreGuiEnabled, but it needs to be local.

--LOCAL
game:GetService('StarterGui'):SetCoreGuiEnabled('Chat', false)

Answer this question