Is :RemoveLastMessageFromChannel() supposed to do this?

Forgive me if this is the wrong topic for this, i just feel like it belongs here…

Is :RemoveLastMessageFromChannel() supposed to do this?


Image

I already did search on developer.roblox.com

ModuleScript:

local Util = require(script.Parent:WaitForChild("Util"))

function ProcessMessage(message, ChatWindow, ChatSettings)
	if string.sub(message,1,5):lower() == "test" 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 removes the message, but I dont think there’s anything to fix the spacing the message was at. If you want that behavior, you might have to fork the chat modules and make your own implementation.

Alright, thanks for the quick reply, i thought this would work considering i just need a way to delete a specific message out of the chat.