I’d recommend using TextService. It would look something like this:
local TS = game:GetService(“TextService”)
local success, err = pcall(function()
filtered = TS:FilterStringAsync(msg, player.UserId)
filteredc = filtered:GetNonChatStringForBroadcastAsync()
end)
if success then
script.Parent.SignPart.SurfaceGui.TextLabel.Text = filteredc
else
print(err)
end
note that filtering only works in game, not studio