I made a custom chat that works perfectly when I don't try to add a filter. When I do, though, everytime I chat the custom chat display shows "Value". I never have done text filtering before so that's probably why. I looked at the wiki but I don't really get it... This is one of the local scripts for the custom chat:
chatbar.FocusLost:connect(function(EnterPressed)
if EnterPressed and chatbar.Text ~= nil and chatbar.Text ~= " " then
local message = chatbar.Text
local plr = chatbar.Parent.Parent.Parent
local chatstorage = game.Workspace:WaitForChild("ChatStorage")
local plrmessage = Instance.new("StringValue", chatstorage)
-- filter stuff starts here
local sucess, message = pcall(function()
local filteredtext = message:FilterStringAsync(message)
plrmessage.Name = plr.Name..": "..filteredtext -- filter stuff ends here
wait(0.1)
chatbar.Text = "Press \"/\" to chat!"
end)
end
end)
Yeah, I'm clueless of how to filter this. Can someone help?

2 comments
The filtering still doesn't work. When I say something that roblox would censor such as "oder" or any number, it doesn't get censored.
Also, the textbutton doesn't reset and the chat display doesn't show anything.