Profanity use in scripts

So i want to make a random symbol generator that involves numbers, symbols and letters;

However, i want to make a filter that will prevent it from generating very naughty words, and my idea is to use a table with the swear words that are very naughty

But riddle me this, roblox devs: can you use swear words in scripts that the player won’t see?

2 Likes

This should be in Help and Feedback > Scripting Support as its asking a question about scripting

1 Like

should be completely fine. roblox had a thing a while back where they were going to scan scripts iirc but i dont think this ever went ahead (for games anyway?)

alternatively you could just use the available text filter APIs for your random output - might have a lot of false positives though, and you’ll have to attribute the string to a player

4 Likes

Use TextService:FilterStringAsync():GetNonChatStringForBroadcastAsync() on the generated string and regenerate it if it gets filtered.

Make sure to put a hard cap on how many times it can regenerate, though. It’s possible for the text filter to get ‘stuck’, and if you’ve retried like 5 times then it’s probably not going to work.

1 Like

do you mean like, there’s no way in hell they can see this (like a code comment), if so yea you can swear in there i guess.

1 Like

Yeah, if it’s variable names or comments, you could name it literally anything you want. Like I mean literally aℕything…

2 Likes

Was that supposed to be natural

Ummmm not sure what you’re talking about :grin:.

1 Like

I’ll look into that as well, I guess.