.Chatted event not firing

I’m trying to save the message history of the users, and the .Chatted event does not fire. I’ve added lots of prints and only the first one works, I’ve ran out of options at this point.
The defaultchat is enabled, game.Chat.Chatted or ChatService.Chatted does not make any difference. I have no clue why it’s not working. (this is just a little chunk of my code, if somebody is wondering) I’ve also tried :Once and :Wait

while true do
    print("1")
game.Chat.Chatted:Connect(function(plr, message)
        print(message)
        print(plr)

What’s the while true do doing there?

By the way, why don’t you do that way?

game.Players.PlayerAdded:Connect(function(player)
   player.Chatted:Connect(function(msg)
      print(msg)
      print(plr)
   end)
end)

(For :Connect() you don’t need while true do or something like that, just execute 1 time and work forever)

1 Like

The while true is there, because I’ve got desperate at this point, also thank you for the chunk of code, let me check if it works. UPDATE: still doesn’t fire.

Can you show your entire script? and where is it?

1 Like

I typed something wrong and now it works bye :skull: thx 4 help ur a good person :pray::pray::pray:

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.