Text Moderation question

Hi there, I have a question. In my game, players can chat with each other with a custom made ui and chat system, and players can post text posts. One problem: bad things are not going to get moderated. Is there an option to add a single script that checks every single text and if it’s bad, it gets automatically censored?

1 Like

I suggest you to look into Text filtering | Documentation - Roblox Creator Hub.

This should solve your question, make sure you filter every single post before it gets sent!

But can i just make one Script that Checks everything because it would be very Hard to put at every Text Box etc a Filter request

I would advise to have one filtering module script accessible from the ReplicatedStorage service (client and server). Then you can filter any text in any script by just using a require() where you need it.

You clearly even remotely don’t even know what are you talking about and as far as i know using custom filter without roblox’s filter on top does violate TOS.

1 Like

No.
You have to filter string async and send it to a client through remote event where it will automatically turn into filtered text upon reciving from remote event.

As far as I’m concerned, I haven’t given any practice usage except for the module script which is a perfect application for a function that will be used more than many times across clients. So yes, using a module to filter the text on the client is surely useful (giving a hint to the user trying to send the message that some parts will get filtered), but filtering on the server is ESSENTIAL as any client can still send unfiltered text to the server though exploiting, so the server does need to check the string before sending it to other clients.
And also let me know where did you understand that I was inciting OP to use a custom filter please :). I even sent a link in a previous message which is called “Text filtering | Documentation - Roblox Creator Hub” clearly meaning it is using the text filtering Roblox wants us to use.

Use this like documentation says:

ts=game:GetService("TextService")
--For everyone in server:
filteredstring = ts:FilterStringAsync(string_to_filter):GetNonChatStringForBroadcastAsync()
--For a specific person:
filteredstring = ts:FilterStringAsync(string_to_filter, userid_of_sender):GetNonChatStringForUserAsync(userid_of_receiver)

--do stuff with new filteredstring

And do filtering on the server because exploiters can mess with the client code and make it not filter if it’s on the client

And I don’t think you need it for every text box, just put a LocalScript for everyone that sends their message text to the server for filtering after they send it, then server filters it and sends it back to the receiving clients for them to show it in their textboxes and that is what’s saved

Filter it whenever the client sends their own text post to the server. If you save the unfiltered text on the server and then filter it for each client every single time it will be hard on the server and is probably the least efficient way to do it. Just spend 5 minutes adding it to avoid a 5 day suspension of your game (or permanent deletion)