FilterStringAsync() isn't working on client anymore

I call it properly, I double checked.

I might add that one of my friend’s games is under review (And I am [trying] to prevent mine from going under), and despite the fact that I used FilterStringAsync(), they said it “was not filtering” - This is the reason.

To add: Could a staff member perhaps let moderation know?

How are you calling it? It still works for me. And if there is an error, it should not be returning the unfiltered string, it should be throwing an error. Is it returning the unfiltered string?

It’s returning an unfiltered string at the moment.

The line of code that handles filtering (from a localscript) is
local Message = game:GetService("Chat"):FilterStringAsync(Message, Sender, game:GetService("Players").LocalPlayer)

Where Message is the message a client sent and Sender is the client that sent the specific message.

The chat works as so:
Client presses enter with text in their chat box, firing a RemoteEvent on the server.
Server handles message, firing the same event to all clients.
Clients pick up the message (with a few extra args from the server) and displays it.

Is that the exact line of code? Do you pcall it or do anything differently? What place is this in?

That is the exact line of code, yes.

I do not have it in a pcall wrapper, it’s directly in the function that runs when OnClientInvoke fires on the remote event.

This is on my personal game, “Dragon RP” (Which I might shut down to remove the custom UI since filtering isn’t working and I don’t want to go to the hassle of a reviewed game) and I think this is happening on my friend’s game, too.

Can you make a simple test place that reproduces this issue? I have not been able to reproduce this.

I’m rather confused myself … I tried making a repro and I can’t either.

One thing I have noticed is that it suddenly IS filtering properly, which is probably related to a small edit I did that may have sanitized the input.

If a moderator wants to close this, we’re good.

Edit: I might add that it still throws the error, but filtering is functional so I should be safe.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.