first one is what client seeing
second one is what server seeing
However, this approach exposes the possibility of exploiters gaining access to unfiltered content. Furthermore, sending individual filter requests for each client may lead to an excessive number of requests, potentially triggering rate limits and causing some of them to fail. Optimal practice dictates filtering the string once on the server and then distributing the sanitized version to all clients for display.
this thread is for just an tutorial or something like this, you can improve that and i type in last line’s above line: its just an example but you can make ur scripts like this
like you can filter the unfiltered value so they cant access to unfiltered content and for rate limits add text edit limit like you need to wait 2-3 minutes for editing text again?
you can filter strings in the server (roblox will restrict filtering to the server)
You shouldn’t filter text on the client as you will be putting more strain on the Roblox servers by making each player send the same exact text filter request, which means that instead of sending one request, you are sending # of number of requests which will be determined by the player count. For example, if you have 50 players, you will be making 50 requests per change to the Roblox servers. What you should do is let the server filter the text, which will end up being one request per change.
Additionally, you are making 3 trips instead of one, which will significantly delay text from updating in the live game. First, you are sending a request to the server, then you are waiting for server to tell you that the text has to be filtered, and then finally you are sending request on the client to the text filtering API, and you will have to wait for the response.
Instead of preventing exploiters, you are just giving them more freedom.
As all the replies said above, this also puts a lot of work on Roblox as sending individual filter requests for each client may cause some of them to fail, which will result in some unfiltered content being shown into your game and maybe causing your game to get moderated and taken down.
Roblox is also going to deprecate and soon disallow filtering from the client to honor server-sided filter requests. A server-sided system is much more secure and is easy since it filters once, and then sends the filtered message to all clients.
I would also advise you to check out the server-client model and the filter documentation.
You shouldn’t filter text on the client. If you just filter it on the server like everybody already does, this topic is not useful.
If only the player who typed it sees it on their local session then theres no reason to filter it.
why did you act as if i didn’t read the post??? you can filter strings in the server, AND exploiters can bypass your method
i think you cant understand me yea you can filter strings in server but my method exploiters cant bypass this method BECAUSE my script not filtering string in sender my script is filtering after getting filterstring event (each client filtering string then seeing it HOW EXPLOITERS CAN ACCESS TO OTHER CLIENTS? IM NOT USING REMOTEEVENT FOR FILTERING * in server or in sender’s client *) if they can how, can you explain?
nah every client, if only player who typed so why i made this text-filter?
Your method leaves out a couple of critical issues.
In your method, the requests that are being sent to the filter API are significantly more than the server-sided method. It may cause the filtering to fail or take longer. And, exploiters can alter the local script and show themselves the actual unfiltered text coming from other clients.
Server-sided on the other hand, filters once and sends the filtered text to all the clients. No matter what exploiters do, all they will see is the filtered text. They cannot see the original text no matter what. And it’s much more reliable since there aren’t tens of requests being sent to the API at once when someone sends a message.
In both methods, the exploiter will, of course, not be able to change what other players say or leave them unfiltered for other players.