My script can detect if a player said walter or walter7 in any case. I want to expand this to the whole sentence. For example if a player said ("Come Walter") it would still print their name.
for i,currentPlayersChatting in pairs(game:GetService("Players"):GetPlayers()) do
currentPlayersChatting.Chatted:Connect(function(msg)
if string.lower(msg) == "walter" then
print(CurrentPlayersChatting.Name)
elseif string.lower(msg) == "walter7" then
print(CurrentPlayersChatting.Name)
end
end)
end
How would I expand this to search the whole sentence?

1 comment
That means that you talked walter then it could be walter7..?