Having some troubles with TextService:FilterStringAsync()

local TextService = game:GetService("TextService")

    local filtered = TextService:FilterStringAsync(message,client.UserId)

For some reason, the thing printed is “Instance:server”, implying that the filtered variable is an instance. Anyone know what I did wrong?

The “message” parameter comes from a message sent by the player on the client. When I printed this, it printed the message successfully.

1 Like


That explains it probably, what is message supposed to be? I’m assuming a string or value?

I believe it was thought to be the filtered version of a string. There isn’t much other ways to filter a string other than Chat:FilterStringAsync, which requires a player that the message is being sent to. I just want to get a filtered version of a text.

Filtered is a TextFilteredResult which has its own functions.

Use something like GetChatForUsrrAsync on it.

1 Like

So I should use filtered:TextFilterResult():GetChatForUserAsync()?

Nevermind, figured it out. Thank you.