I have a custom chat system, since roblox doesnt provide the ability to configure chat and give people custom stuff i made a custom chat system that gives chat tags, custom team colors, etc
so this means i had to make a filtering system, etc etc
but how can i check if a player hit the chat cooldown?
Do not make a custom chat filtering system use roblox’s own chat filters first hand,
if you want some stuff like converting ez to “I am player without any skill” then use your own filter beforehand roblox’s one
i didnt mean custom filtering lol, i just meant since i was taking the messages before what seems to be before it was filtered for broadcast using ‘onincomingmessage’ and redid it to support custom tags and colors and fired it to server to show up for other clients i also had to filter it again for broadcast before firing it back to clients
If you don’t want to use Roblox’s TextChatService, I would probably recommend using a somewhat similar layout to them.
You’ll need to create a custom event of sorts so you know when a player chats, and you might want to implement something like ShouldDeliverCallback, maybe ShouldChatCallback, which tells your chat internals whether or not the message should be sent.
Then, just log the last time they chatted, with tick() or some other method, and compare against that timestamp within the callback.
If this won’t work for you, could you please share some code or else a rough outline of your chat system? It’ll be hard to help without it otherwise.
im using roblox textchatservice, and i want to provide users with custom team colors nametags and so on. i implemented a incomingmessage function where it takes the message, redoes it based on the players team and its current custom color and firing to server, where server filters it out and fires it back to all clients
now the only issue is how can i check if roblox placed a chat cooldown on the player since you can just spam and get the ‘your on cooldown’ message but since theres no implementation to check if theres a cooldown and prevent your spam you can just continue on
In your OnIncomingMessage, if msg.TextSource is nil and msg.Text is "You must wait before sending another message.", you know the player is on cooldown.
tcs.OnIncomingMessage = function(msg: TextChatMessage)
--...
local isOnCooldown = (not msg.TextSource) and (msg.Text == "You must wait before sending another message.")
--...
end