game.Players.PlayedAdded:connect(function(player)
player.Chatted:connect(function(msg)
print(msg)
if msg == string.match(msg, "Hello") then
print(msg)
end
end)
end)
I have this script, so when a player chats something, and if that something is 'Hello', then it will print the message in the output. What I want though is sometimes players say 'Hello, how are you', or something like that, where they say 'Hello', but they add more to the message. Is it possible to pick it up if the word is used in a sentence.
Secondly, players often say 'hello' (lowercase H). Is their anyway to make it still work with lowercased letters?
Thanks
EDIT I added string.find, but if I say 'Hello abc' it doesn't work...

1 comment
if msg:lower():find("hello") then