From that code that is it, should I add a if statement like:
local FilteredStr = pcall(TextService.FilterStringAsync, TextService, Messages, Player.UserId, Enum.TextFilterContext.PublicChat)
if filteredText then
return FilteredStr:GetChatForUserAsync(Player.UserId)
else
return ""
end
end
Alright, I see the issue it looks like you’re still using the Messages and not the filtered text.
Try using this:
for index, text in ipairs(Messages) do
local tfResult = game:GetService("TextService"):FilterStringAsync(text, Player.UserId)
local filteredText = tfResult:GetNonChatStringForBroadcastAsync()
Messages[index] = filteredText
end
This will replace the text in the Messages array with their filtered values.
Please keep this thread on-topic. What you guys are responding right now is not related to the topic at all.
I also want to remind you guys of the Forum Rules.