Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do you detect bad words using global function?

Asked by
noammao 294 Moderation Voter
6 years ago

Hi. I have built a script that allows you to write in a textbox and then when you press enter whatever you have written will show up over your head with a billboardgui and a text label. I've also put out some if and elseif statements just so that people won't be able to use too many letters. But now I want to create a filet for bad words with a global function( _G) but I don't really know how. So far I've tried:

script.Parent.MouseButton1Click:connect(function()
     if name.Text == ">> Username <<" then
        name.Text = user.Name.. " try again."

    elseif name.Text == table.concat(_G.Banned," ") then
        print("bad word")

where Banned is the global function (Or you could say global table.). There I have a lot of bad words. The thing I want to do is to make the elseif statement loop through the table of bad words and if one of the bad words is equal to what the person has written then it will give out a warning or an error.

0
you must use roblox filtering. abnotaddable 920 — 6y
0
Thank you. noammao 294 — 6y

Answer this question