Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do I detect if any player says something?

Asked by 3 years ago

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?

0
Please put some more effort into your question. What does not work? What code did you try? radiant_Light203 1166 — 3y

1 answer

Log in to vote
0
Answered by 3 years ago

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)
0
Oh thanks I’m gonna try that bomey2012 0 — 3y
Ad

Answer this question