Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Can you fire after someone has said a specific thing in chat?

Say for example someone said ':Start event1' then a script picks it up and continues.

How would you detect it?

2 answers

✓ Accepted answer

You can use the Chatted event of the player object. https://developer.roblox.com/api-reference/event/Player/Chatted

For example:

game.Players.ChildAdded:Connect(function(player)
    player.Chatted:Connect(function(message)
        -- the first parameter of the Chatted event is the message that the player sent. I put this variable as 'message', but you change it to anything you'd like
        
        if message:lower() == 'hi' then
            print(player.Name..' said hi')
        end
    end)
end)

This discussion is preserved as it was. New answers, comments, and votes are closed.