I have looked at the roblox code wiki and it does not work and I tried google but I only detects me, does anyone have any scripting that can help?
Basically, to do this you have to check for the player chatted event which happens when a player chats which means you have to have a player variable for this to work.
game.Players.PlayerAdded:Connect(function(player) player.Chatted:Connect(function(msg) if msg == "Foo" then --do something end end) end)