Hello, I am currently working on a LocalScript and noticed that the Player.Chatted event fires twice.
I’ve used the .Chatted event a lot of times before and it always fired once, however now it looks like it fires twice. First, it fires with the message being unfiltered (which is how it always was), and then after a small delay it gets fired AGAIN but this time it’s filtered.
I NEED the message to be unfiltered, that’s why I’m using .Chatted. Is this a new Roblox feature, or am I missing something?
This is the script I used to test it:
local Players = game:FindService("Players")
repeat
task.wait()
until Players.LocalPlayer
local lp = Players.LocalPlayer
lp.Chatted:Connect(function(message)
print('chatted: ' .. message)
end)
I also modified my script to show what’s being sent in the chat, and this is what i got:
game.Players.LocalPlayer.Chatted:Connect(function(msg)
game:GetService("StarterGui"):SetCore("ChatMakeSystemMessage", {
Text = "[+] Detected: " .. msg,
Color = Color3.new(0.85, 0.85, 0.85)
})
end)
Observe how the event fires the unfiltered message first, then SayMessageRequest is fired and it replicates and shows for everyone else in the chat, and THEN the .Chatted event is fired AGAIN but filtered this time. I highly suspect this to be some new unannounced Roblox feature.
Also note that it doesn’t always fire twice, only sometimes. I couldn’t figure out the pattern.
TIA!
Edit: I forgot to clarify that I also need to be able to process the messages from this event very quickly, so debounce is not possible here.