TextBox Filtering

Hello I’m creating a system that a player can use to change the car plate text, and I’m creating this using a text box inside a GUI, so when te player changes the text, automatically the text on the plate (when Text box Stop Focused ) changes. So all good but I have to do Text Filtering on the Text Box and I don’t know how to do it, anyone can help me ?

1 Like

Maybe refer to this? Not sure if it will help you with your situation

Here’s an article that goes into it in detail: Text and Chat Filtering

2 Likes

Its as simple as how simple it is.

local textService = game:GetService("TextService")
local res, err = pcall(function()
   return textService:FilterTextAsync("discord",0,1)
end
if res then
   local res2,err2 = pcall(function()
      return res:GetNonChatStringForBroadcastAsync()
   end
   if res2 then
      print(res2)
   else
      print(err2)
   end
  else
   print(err)
end

Dont forget to wrap it in pcall and always do it in server so it wont get hackable


did colbert just say the funny numbers???

1 Like

thank u for the help. but it doesn’t work for me, but I fixed my script