Hello!
I was making a custom chat system with the new TextChatService (TextChatService.ChatVersion = Enum.ChatVersion.TextChatService
). When i finished I wanted to turn the deaftul chat unable to see but the StarterGui:SetCoreGuiEnabled(Enum.CoreGui.Chat, false)
didn’t worked and I don’t know how to fix it. Could someone say me how to fix it, please?
Thanks!
If you’re having trouble disabling chat using StarterGui:SetCoreGuiEnabled(Enum.CoreGui.Chat, false), it could be due to a limitation or change in chat functionality in Roblox.
However, there is an alternative approach you can try to disable chat. You can use the TextService chat service and manually hide chat elements from the UI. Here is an example of how you can do this:
local TextService = game:GetService("TextService")
local Players = game:GetService("Players")
local LocalPlayer = Players.LocalPlayer
local ChatFrame = LocalPlayer.PlayerGui:WaitForChild("Chat")
-- Oculta o chat alterando a visibilidade dos elementos relevantes
for _, child in ipairs(ChatFrame:GetChildren()) do
if child:IsA("Frame") or child:IsA("TextLabel") then
child.Visible = false
end
end
-- Desabilita a entrada de chat do jogador
LocalPlayer.Chatted:Connect(function()
TextService:FilterStringAsync("", LocalPlayer.UserId):Await()
end)
In this code, we hide the chat frame (ChatFrame) and its relevant children, such as frames and text labels. This will effectively remove chat from the UI. We’ve also added an empty filter to the player’s chat input using the TextService service, to ensure the message doesn’t show up even if the chat is hidden.
Ok, I will try it!
Let me try and if it don’t works I will notice you, thanks!
It give me this error:
you forgot to put the error, lol.
I put the error, what I didn’t is the script location
is it an image? so it didn’t come to me. Can you send me the error code?
infinite yield possible , basically means that it doesn’t exist and probably won’t ever exist in the Players’s PlayerGui
Wait, let me reinsert the script
So maybe the error is not in the script, but in the way the GUI was created.
Here is the error
I also think it since When I oppened my playerGui to chek I just fond a thing Called KCoreUI what seems to be the chat. I will try to make that invisible
If you found an object called CoreUI in your PlayerGui, which appears to be related to chat, you can try making it invisible to hide the default Roblox chat. Here is the code you can use to hide the chat through CoreUI:
local Player = game:GetService("Players").LocalPlayer
local PlayerGui = Player.PlayerGui
local coreGui = PlayerGui:WaitForChild("CoreGui")
local chat = coreGui:WaitForChild("Chat")
chat.Visible = false
This code looks for the CoreGui object in the PlayerGui and then finds the Chat object inside the CoreGui. You can then set that object’s Visible property to false to hide the chat.
Keep in mind that the functionalities and internal structure of the Roblox chat may change over time, so it is possible that this particular method may not work in future versions of Roblox.
The problem is that inside my playerGui instance, there isn’t any “CoreGui” (the CoreGui replcaement is where I put the leaderstats and chat)
I would love it if my DEVForum wasn’t a sh**h*le and the images loaded for me.
In that case, there could be different ways the default chat is being displayed in-game. One possible approach is to identify specific chat elements within the PlayerGui instance and then hide them individually.
Open this link to see the image
Anyways: The Gui Instance don’t appear since is a core Gui and the Core Guis aren’t placed inside the playerGui. Then I can’t turn them invisible. (I think)
Let me see if I understand. The default roblox balloon is overlapping your custom balloon. That’s a big problem.
Yes, and we can’t disable it: The core Guis can’t be disabled manually:
The current identity (2) cannot Class security check (lacking permission 1)
So you even tried to disable the chat using this method,
(client, in startergui)
local gui = game:GetService("StarterGui")
gui:SetCoreGuiEnabled(Enum.CoreGuiType.Chat, false)
and it didnt work?
Maybe he’s having permissions issues, I’m trying to come up with some code here for him, but I don’t know if it will work.