I have a custom chat (finally) But there is a problem! I don't know how to filter the text! If I don't, Roblox would ban my game. I tried :FilterStringAsync(text,userid) but it wouldn't work. Anyone have a function or something for filtering text? Please help in advice!
function filterStrings(stringToFilter, player) local stringToShowToPlayer = chatService:FilterStringAsync(stringToFilter, player) return stringToShowToPlayer end
There are two problems with your code. One is what filter you are using, the other is how you are using this filter.
1) FilterStringAsync takes 3 parameters, not 2. it takes text,Playerfrom and Playerto.
2)More important, FilterStringAsync is used with private messages from one player to another, not global chats. For that use FilterStringForBroadcast