Hi, I want to detect a chat message for my game, but Player.Chatted seems to be incredibly buggy for some reason (or I’m just using it wrong). The only one that actually prints a message is the one in the PlayerAdded block, but not the CharacterAdded block. The one in the local script also doesn’t work.
-- script in serverscriptservice
game.Players.PlayerAdded:Connect(function(plr)
plr.CharacterAdded:Connect(function(char)
plr.Chatted:Connect(function(msg)
print(msg)
end)
end)
end)
plr.Chatted:Connect(function(msg)
print(msg)
end)
end)
-- local script in startercharacterscripts
game.Players.LocalPlayer.Chatted:Connect(function(msg)
print(msg)
end)
Thank you in advance!