local filteredText = "Hey"
That does not work how could i bring this to work?
I don’t believe either of them will work. You should be doing:
local unFilteredText = "test"
local filteredText = game:GetService("TextService"):FilterStringAsync(unFilteredText, 1641412214)
For both cases.
How can i do that for Chat Service
You can do
local filteredText = game:GetService("Chat"):FilterStringForBroadcast(stringToFilter, player)
But i cant use FilterStringForBroadcast, i need to use FilterStringAsync, because FilterStringForBroadcast are for like Wall Messages, server cross text…
You can use it for anything, if it’s broadcasted to other players I recommend using it. FilterStringAsync is for stuff like chat.
If you need FilterStringAsync, you can use the player ID and who it’s being sent to or it’s optional, then you can use the message after that. It’s mostly similar to the broadcast function.
Thanks, when i use
FilterStringAsync what do i need to put to the third argument, i want to send it to all Players so i dont need another PlayerId:
local textMessage = chat:FilterStringAsync("Text", UserId, What do i need to put here)
Chat:FilterStringAsync is deprecated, i used
it says deprecated for the client, but it doesn’t say server.
I was more precisely referring to this:
“Partial Deprecation WarningCalling this function from the client using a LocalScript is deprecated”.
Though TextService might be better.
Yeah but they also say its better to use TextService instead of Chat for FilterStringAsync