In my game, I wanted is so that when players say something in a message a sound would play. I have a script that will play a sound when they say something, but only if it is that specific something and nothing else. if players say "help" then the sound will play, but if they say "can someone help me?" nothing will happen... How would I get the script to play the sound for all messages including the word help? Here is the script:
function onPlayerEntered(newPlayer)
newPlayer.Chatted:connect(tutorialChatted)
end
game.Players.PlayerAdded:connect(onPlayerEntered)
function tutorialChatted(msg)
if (msg=="help") then
local mm = workspace:findFirstChild("Help Sound")
mm.Playing = true
end
end

2 comments
Just remove line 8 and 12
but I only want the sound to activate when players say something with help in it, just not restricted to only saying help