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

Non case sensitive onchatted script?

How would you detect a string, that's not case sensitive, without adding a new table for every single message you would like to detect, like hi, and if the player said Hi, it would still work without actually having to add "hi" and "Hi"

1 comment

0

Use ':lower()' on both the chatted message and the table, then compare. (making it uppercase works, too)

1 answer

For it to be non-cap sensitive, you should do;

if msg:lower() == "hi" then --Using ':lower()', it will revert what the player said into something like this: Player said 'HI', :lower() turns it to 'hi'
print("Hi bro! :D")
end 

Hope this helped!

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