I'm not too familiar with how the chat filtering stuff works, so I used a bit of code off the devforums, but still when I try to print the filtered result in an uploaded place, all I get is nil. This is filtered in a server script
Here's the code:
local TextService = game:GetService("TextService")
local function onSetName(player, text)
local TEXT_TO_FILTER = text
local filterSuccess, filterResult = pcall(function()
local filteredTextResult = TextService:FilterStringAsync(TEXT_TO_FILTER, player.UserId)
filterResult = filteredTextResult:GetNonChatStringForBroadcastAsync()
end)
if not filterSuccess then
warn("Error filtering: ", TEXT_TO_FILTER)
else
print(filterResult)
end
end
setname.OnServerInvoke = onSetName
Any ideas?
