Error 267 with custom chat. Using ROBLOX’s filtering system. Tried testing yield error.
local function filterChat(text, playerFrom, playerTo, area)
local filteredMessage
local succ, err = pcall(function()
filteredMessage = game:GetService("Chat"):FilterStringAsync(text, playerFrom, playerTo)
end)
wait(0.5)
if not succ then
filteredMessage = "<ERROR_FILTERING_CHAT>"
else
game.ReplicatedStorage.ARCONSYSTEM.events.ChatEvent:FireClient(playerTo, playerFrom, filteredMessage, area)
end
end
Can you print out text, playerFrom, playerTo? Nothing looks wrong based on what you wrote. By error 267 you meaning what err is after the pcall?
I assume it must be one of the parameters because I tested this in studio:
local function filterChat(text, playerFrom, playerTo, area)
local filteredMessage
local succ, err = pcall(function()
filteredMessage = game:GetService("Chat"):FilterStringAsync(text, playerFrom, playerTo)
end)
print(succ and "Success:" or "Error:", succ and filteredMessage or err)
end
filterChat("test", game.Players.Vulkarin, game.Players.Vulkarin)
and the output was: Success: test
The default won’t work for everything, there’s nothing wrong with filtering things outside of the built in roblox chat.