Hello, I want to achieve a bubble chat system where it uses the npc colored bubble chat for my game, my problems are that they won’t censor. Here are some screenshots of what I want to achieve
I want my system to censor the bubbles like as seen in this screenshot.
I think you can try using the method @synical4 mentioned, give the msg the player sent as the first parameter, the player’s userid as the 2nd and store the result in a variable and make the chat use that to chat instead of the message they originally sent?
function StartChat(player)
repeat wait() until player:WaitForChild("ChatColor")
player.Chatted:connect(function(msg)
if player.Character:findFirstChild("Head") then
game:GetService("Chat"):Chat(player.Character:findFirstChild("Head"),msg,Enum.ChatColor[player.ChatColor.Value])
end
end)
end
game.Players.PlayerAdded:connect(StartChat)
function StartChat(player)
repeat wait() until player:WaitForChild("ChatColor")
player.Chatted:connect(function(msg)
local result = game:GetService("TextService"):FilterStringAsync(msg,player.UserId,Enum.TextFilterContext.PublicChat):GetNonChatStringForBroadcastAsync()
if player.Character:findFirstChild("Head") then
game:GetService("Chat"):Chat(player.Character:findFirstChild("Head"),result,Enum.ChatColor[player.ChatColor.Value])
end
end)
end
game.Players.PlayerAdded:connect(StartChat)
Again, anytime! I’m just glad to be of help to you seeing as you’ve been having a lot of issues trying to fix up an old game, which I do respect your effort in doing so! If you have anymore issues don’t be afraid to make another post!