I am trying to make an antiscam filter that looks for things like Player.Username.."just got TONS of ROBUX using", kick them from the server, and then deletes the message. This might be more complicated because of the /me part, but how can I delete the message from the chat to reduce the chance of people falling for it.
COMMUNITY QUESTION
How do I delete a message from the chat?
1 answer
I believe I know the answer! The answer comes from https://developer.roblox.com/en-us/articles/Lua-Chat-System Insert A ModuleScript Inside of Util's parent (I have no idea)
Replace the source of the ModuleScript with:
local util = require(script.Parent:WaitForChild("Util"))
function ProcessMessage(message, ChatWindow, ChatSettings)
if string.sub(message, 1, 5) == "/last" then
local currentChannel = ChatWindow:GetCurrentChannel()
if (currentChannel) then
currentChannel:RemoveLastMessageFromChannel()
end
return true
end
return false
end
return {
[util.KEY_COMMAND_PROCESSOR_TYPE] = util.COMPLETED_MESSAGE_PROCESSOR,
[util.KEY_PROCESSOR_FUNCTION] = ProcessMessage
}
It's my first time messing around with the Lua Chat System so yeah.
This discussion is preserved as it was. New answers, comments, and votes are closed.

3 comments
hmmm... I always wanted to know how to do that too. Great idea for the anti-scam filter
Yes totes agree!
/me commands are now disabled by default. https://devforum.roblox.com/t/in-game-chat-me/280889