#Filtering Text from BillboardGUI
1 messages · Page 1 of 1 (latest)
you have to filter through the server if its shown to everyone
if its just something only that player can see you dont have to filter it
this is how i do it
function filterString(playerUserId : number, str : string)
if str == nil then return false end
if not str then return false end
if typeof(str) ~= "string" then return false end
local filtered = ""
local textFilteringResult
local success, errormsg = pcall(function()
textFilteringResult = TextService:FilterStringAsync(str,playerUserId)
end)
if not success then warn(errormsg) return end
local suc, ermsg = pcall(function()
filtered = textFilteringResult:GetNonChatStringForBroadcastAsync()
end)
if not suc then warn(ermsg) return end
return filtered
end
Okay. It worked, not sure where you found that code snippet, I was looking through every dev forum for a solution. Thanks!