FilterStringAsync:GetNonChatStringForBroadcastAsync() returns empty string often

I recently started using TextService:FilterStringAsync(text,player.UserId,Enum.TextFilterContext.PublicChat):GetNonChatStringForBroadcastAsync() in direct replacement of game.Chat:FilterStringForBroadcast(text,player) because of Chat getting deprecated soon. I am using it to filter strings for roleplay names/descriptions, save file names, and other player-created non-chat text. However, the new method returned empty strings about 25-50% of the time, and several players reported not being able to set roleplay names or see the names of their save files anymore, so I reverted back to Chat:FilterStringForBroadcast()

No errors or warnings are thrown when the method returns an empty string. Here is a print log of each time the function was passed with the original text and the returned text from the TextFilterResult.

Expected behavior

I expect TextService:FilterStringAsync(text,player.UserId,Enum.TextFilterContext.PublicChat):GetNonChatStringForBroadcastAsync() to return the filtered text result of the text and not an empty string. I also expect it to throw an error if the function had issues with the request.

I can second I am experience this also.

1 Like

Thanks for the report! We’ll follow up when we have an update for you.

2 Likes

Hello! Is there any update on this? When the legacy chat service gets deprecated on April 30th, I am worried that players will have issues creating custom text because of this issue.

I used TextService:FilterStringAsync(text,player.UserId,Enum.TextFilterContext.PublicChat):GetNonChatStringForBroadcastAsync() as a direct replacement for game.Chat:FilterStringForBroadcast(text,player) for players’ roleplay names/bios and character save files, and when I tested it, almost all players reported that most of their rp names were blank. (No other code was changed except for this line.)

When tested on a Studio Playtest or in a 1 player server, it works fine, but when implemented on a live server with 60 players, it returns an empty string very often.

1 Like

Thanks for the report, unfortunately the team is unable to to prioritize this at this time. We’ve filed an internal ticket to track this.

I’m using :FilterStringAsync and :GetNonChatStringForBroadcastAsync but is simply not doing anything. It doesn’t censor bad words. Any news on this? Cause it’s quite important… @pumpkinDino321

1 Like

Okay I tried it in a published game and apparently works properly to censor bad words. It simply doesn’t work in a non-published game inside studio. But it seems to work in an uploaded game.