roblox chat filter in text label
local TextService = game:GetService("TextService")
local filteredText = ""
local success, errorMessage = pcall(function()
filteredTextResult = TextService:FilterStringAsync(text, fromPlayerId)
end)
if not success then
warn("Error filtering text:", text, ":", errorMessage)
-- Put code here to handle filter failure
end