Ive tried this many times before, but i never understood it. Can somebody help me make a filtering system?
Ive read posts here, and on the documentation but I don't get it.
-- Remote:
local rs = game:GetService("ReplicatedStorage")
local Receive = rs.Receive
local Send = rs.Send
Send.OnServerEvent:Connect(function(player, input)
local function getFilteredBCMessage(textObject)
local filteredMessage
local success, errorMessage = pcall(function()
filteredMessage = textObject:GetNonChatStringForBroadcastAsync()
end)
if success then
return filteredMessage
end
return false
end
end)
-- Localscript:
local debounce = false
local rs = game:GetService("ReplicatedStorage")
local Receive = rs.Receive
local Send = rs.Send
local button = script.Parent
local inputi = script.Parent.Parent.TextBox
local outputi = script.Parent.Parent.TextLabel
local input = ""
button.MouseButton1Click:Connect(function()
if not debounce then
debounce = true
outputi.Text = "Calculating..."
input = inputi.Text
Send:FireServer(input)
Receive.OnClientEvent:Connect(function(player, outputdone)
outputi.Text = outputdone
debounce = false
end)
end
end)
I tried to do something but I cant come further

2 comments
What do you mean by a filtering system?
You never fire back to the Client, nor do you send back the filtered string. That, and the function 'getFilteredBCMessage' is never executed, nor does it receive a TextFilterResult Object.