Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How do i check if a player inputed a bad word?

Please help! I really need it, it's for when a player puts in text inside a TextBox. I've tried making my own filter but it didn't work.. Anything would be awesome!

3 answers

Use FilterStringForPlayerAsync(). It filters the text for whatever age the user is. Example:

local text = "[swear] you"
FilterStringForPlayerAsync(text, plr) -- make sure you have defined plr, this is just an example.

Here is the wiki page.

It's for a Normal textbox, ik how to do the rest all i need to do tis filter out anything the player may put that's bad i've tried the chat thing but of course won't unless it's a chat script whcih it's not, Please anymore help?

2 comments

0

Mine isn't meant for a chat. It's meant to filter any string. It works for me in studio, so I don't know what's wrong with what you are doing.

0

FilterStringForBroadcast can be used normaly too. It just returns a string with no bad words. It's not only used for chats.

This discussion is preserved as it was. New answers, comments, and votes are closed.