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

How do I play an audio when onChatted?

I know how to make commands when onChatted, but I want it to play an audio when the person says anything, not 'anything' but like anything in gerneral. Can anyone help?

1 answer

Local Script in StarterGui...

game.Players.LocalPlayer.Chatted:connect(function(msg)
if msg:lower() == "message to chat in lowercase" then
script.Sound:Play()
end
if msg:lower() == "something else in lowercase" then
script.OtherSound:Play()
end
end)

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