|
| 15 Jun 2016 06:33 PM |
| When the script detects non-letters like "+""_""#""%""&" how do you make it that it blocks those out? |
|
|
| Report Abuse |
|
|
|
| 15 Jun 2016 06:34 PM |
What do you mean by 'Block Out'?
#code function brag() print("R$1,146") end |
|
|
| Report Abuse |
|
|
|
| 15 Jun 2016 06:35 PM |
| I guess he means that these non-letters won't show up on the chat? |
|
|
| Report Abuse |
|
|
|
| 15 Jun 2016 06:36 PM |
| Just like banning cuss words in games |
|
|
| Report Abuse |
|
|
|
| 15 Jun 2016 06:37 PM |
I made one of these before, but I wasn't able to replace the word with those. I was able to tell them not to swear in the textbox though.
#code function brag() print("R$1,146") end |
|
|
| Report Abuse |
|
|
|
| 15 Jun 2016 06:39 PM |
| But still, blocking these from the chat may cause problems with communication between other players in the game, what if someone didn't mean to swear and just said something like "100%" or a person's username that has a underscore? |
|
|
| Report Abuse |
|
|
|
| 15 Jun 2016 06:44 PM |
| I'm making a custom name system script but one thing I'm afraid of is exploiting. They would add things like "F***" "S***" "M*****F***ER" "@" "#" or they would make their name invisible. |
|
|
| Report Abuse |
|
|
|
| 15 Jun 2016 06:51 PM |
| You should use Roblox's system. It's far easier, and actually conforms to their standards. |
|
|
| Report Abuse |
|
|
Borsy
|
  |
| Joined: 31 Jul 2014 |
| Total Posts: 15111 |
|
|
| 15 Jun 2016 06:52 PM |
just use http://wiki.roblox.com/index.php?title=API:Class/Chat/FilterStringAsync if someone is swearing, then people can report them
|
|
|
| Report Abuse |
|
|
|
| 15 Jun 2016 06:55 PM |
| I think you should just let the people report the player instead of creating this script. |
|
|
| Report Abuse |
|
|
Borsy
|
  |
| Joined: 31 Jul 2014 |
| Total Posts: 15111 |
|
|
| 15 Jun 2016 06:59 PM |
yeah because these chat messages "20% of roblox players have this hat" "you know what 2+2 is right? you should be able to answer my question then" "some guy on instagram keeps using unrelated hashtags like #cool #dog #kanyewest #ferrari #nissan" "can i have fish&chips" "^_^"
|
|
|
| Report Abuse |
|
|
|
| 15 Jun 2016 07:15 PM |
| It's not a chat script. It's a textbox script. |
|
|
| Report Abuse |
|
|
Borsy
|
  |
| Joined: 31 Jul 2014 |
| Total Posts: 15111 |
|
|
| 15 Jun 2016 07:19 PM |
ok here
badLetters = {"@", "#", "put more here"} for k, v in pairs(badLetters) do str = string.gsub(str,v,"") end
|
|
|
| Report Abuse |
|
|
|
| 15 Jun 2016 07:52 PM |
http://wiki.roblox.com/index.php?title=API:Class/Chat/FilterStringAsync was the right answer.
local function Filter(str, playerFrom, playerTo) return game:GetService("Chat"):FilterStringAsync(str, playerFrom, playerTo or playerFrom); end
|
|
|
| Report Abuse |
|
|
Borsy
|
  |
| Joined: 31 Jul 2014 |
| Total Posts: 15111 |
|
|
| 15 Jun 2016 07:53 PM |
@nice he's not using that it's not a chat he doesn't have a "from" and "to"
|
|
|
| Report Abuse |
|
|
|
| 15 Jun 2016 08:02 PM |
It seems like he's trying to filter out bad language, though, so it should still work. Just plug in game.Players.LocalPlayer for both from and to.
|
|
|
| Report Abuse |
|
|