I have created a system where players can purchase a custom name via ROBUX. The custom name is currently being filtered via the function:
ChatService:FilterStringForBroadcast(Text,Player)
Is there any issues with doing this? Assuming I am ensuring that all code is sound and done correctly, and in the event ChatService or this function errors it will NOT let the transaction go through, can an inappropriate name in the event ChatService is down go through? Should I just scrap the idea?
All help is welcomed. Basically what I am asking is- can the filtering system break at some point in the event of an outage and if it does, will it error calling “FilterStringForBroadcast”?
As long as you discard the unfiltered string immediately in the event of a failure to filter, then you will be fine. Also, take a look at TextService; there are a bunch of great examples when it comes to filtering custom strings from players.
It’s great to hear about your custom character name system! Using ChatService:FilterStringForBroadcast(Text, Player) to filter custom names is a solid approach. However, your concern is valid. Here’s the lowdown:
If, in the rare event, ChatService or the filtering function encounters an issue or goes down, the important thing is to ensure that any unfiltered text is promptly discarded. This way, even in such cases, inappropriate names won’t make it through.
As for whether the filtering system can break during an outage, while no system is foolproof, with robust code and contingency planning, you can minimize the risk.
It’s always a good idea to have backup strategies in place and, as @narutosagex17 suggested, taking a look at TextService for additional filtering options might be worthwhile.
If you have further questions or need assistance in making your character name system even more reliable, don’t hesitate to ask. We’re here to support your Roblox project.
I’ll just mark this as the solution because genuinely I do not believe there is more that can be done without using some sort of 3rd party AI tool to handle inputs, such as through a webhook or the like. Using FilterStringAsync/FilterStringForBroadcast and utilizing TextService fully is not a perfect fix as players can still bypass. I had users test my system which included both FilterStringAsync and FilterStringForBroadcast in two separate functions and they were still able to bypass using things like symbols or changing spacing etc. I suppose the best one can really expect on the platform is to have these functions in place to prevent bypassing/inappropriate names as well as a staff team that monitors users in-game for inappropriate names.
If anyone sees this thread and has better advice, let me know. But I believe this is the best one can do in regards to a custom character name system.