local TextService = game:GetService('TextService')
local String = 'Hello world!'
local FilterSuccess, FilterResult = pcall(function()
return TextService:FilterStringAsync(String, PlayerUserId)
end)
if (FilterSuccess)
then
String = FilterResult:GetNonChatStringForUserAsync(PlayerUserId) or ''
else
print(('Unexpected error with FilterSuccess!: %s'):format(FilterResult))
end