So I'm making a game, and I was wondering if you know how to remove the chatbox where all the chats go in so once the player joins it removes?
Game:GetService("StarterGui"):SetCoreGuiEnabled(Enum.CoreGuiType.Chat, false)
Put this in a LocalScript inside the StarterGui and it should make your chat disappear
Make sure to accept this answer if it has helped you.
The ChatBox is a CoreGui coreguis can only be manipulated through startergui, with a method called SetCoreGuiEnabled
.
The SetCoreGuiEnabled method takes in two arguments. The first one is what coregui to alter.. which can be identified by either Enums, numbers, or strings.
"PlayerList" - Enum.CoreGuiType.PlayerList - 0
"Health" - Enum.CoreGuiType.Health - 1
"Backpack" - Enum.CoreGuiType.Backpack - 2
"Chat" - Enum.CoreGuiType.Chat - 3
"All" - Enum.CoreGuiType.All - 4
The second argument is going to be a bool - true or false - and it stands for whether or not to set the coregui enabled.
So the one you're going to alter is 'Chat'. And you want it turned off. So the first argument is going to be "Chat" and the second is going to be false.
game.StarterGui:SetCoreGuiEnabled('Chat',false)
Game:GetService("StarterGui"):SetCoreGuiEnabled(Enum.CoreGuiType.Chat, false)
Use that in a LocalScript.