How would I wait in the chat for someone to say, for example "Pie is cool!".
.Chatted event is what detects chat. However, you'll need to connect it to everyone:
Normal script in ServerScriptService:
function newPlayer(p) p.Chatted:connect(function(msg) if msg == "Pie is cool!" then -- Stuff you want to happen (use p to reference the player who said it) end end) end game.Players.PlayerAdded:connect(newPlayer) for _,v in pairs (game.Players:GetPlayers()) do newPlayer(v) end
game.Players.PlayerAdded:connect(function(player) player.Chatted:connect(function(msg) if msg=="Pie is cool!"then print(player.Name.." chatted \"Pie is cool!\"") end end) end)
The Chatted event listens to everything a player says.