So I made a random code generator but Im scarred its gonna make a word that is totally against roblox’s TOS so how can I run the word through roblox’s filter? My code RN if you need it
local function GenerateLobbyCode()
local code = ''
for i = 0,math.random(MinDigits,maxDigits),1 do
local digit = Digits[math.random(1,total)]
if digit then
code = code..digit
end
end
warn(code)
return code
end
When you filter your text, your codes are likely going to be tagged either way, even if they aren’t inappropriate words. What I would use is something like HttpService:GenerateGUID(false) which periodically generates numbers in between characters, which will be the best you can do to limit bad words.
Code:
local HttpService = game:GetService("HttpService")
local function GenerateLobbyCode()
return HttpService:GenerateGUID(false):sub(1, 8)
end
I added :sub to only get the starting 8 characters in the GUID for readability purposes since the original GUID will be fairly long.
I would also recommend adding a check to make sure the lobby code isn’t in use, but since most of your code is omitted, I can’t do it.
By the way, even if the word is inappropriate, your game won’t be taken down or punished for it unless it was intentional. Roblox won’t just see one ID from your game and ban you lol.