Filtering system not working

I’m trying to make a filter system for a sign in roblox although it keeps coming back “Failed to filter text for Code1Guest Argument 3 missing or nil” and I have no idea why


ChangeTextEvent.OnServerEvent:Connect(function(player, booth, newText)
if not booth or ClaimedBooths[booth] ~= player.UserId then return end
if type(newText) ~= “string” then return end
local signPart = booth:FindFirstChild(“PlayersSignPart”)
local gui = signPart and signPart:FindFirstChild(“SurfaceGui”)
local label = gui and gui:FindFirstChild(“TextLabel”)
if not label then return end
local filteredText
local success, err = pcall(function()
local result = ChatService:FilterStringAsync(newText, player, nil)
filteredText = result:GetNonChatStringForBroadcastAsync()
end)
if success and filteredText then
label.Text = filteredText
else
label.Text = “[Filtered]”
warn(“Failed to filter text for”, player.Name, err)
end
end)

Firstly, please wrap
code in ```lua

Second: Bro, you can’t be so deadahh :wilted_flower:
It literally says the reason for the error.
You must pass the player as an argument.

1 Like

lol i’m on 2hrs sleep but I managed to fix it anyway