It's perplexed me for a while. I've looked up the chatted function and strings on the wiki, but I cant find anything. I may not be looking in the right place. A wiki link and/or example code would be EXTREMELY helpful and is all I'm really looking for.
✓ ANSWER ACCEPTED
How do I make chat commands be both uppercase and lowercase?
1 answer
✓ Accepted answer
I'm going to assume you mean that when a player types a command like this:
eXplODe
The command works. That's quite simple and you could just do this:
game.Players.PlayerAdded:connect(function(plr)
plr.Chatted:connect(function(msg)
if string.lower(msg) == "explode" then
-- command code
end
end)
end)
string.lower() turns whatever string you provide lowercase. Just match that up with a lowercase command and it'll work every time. Hope I helped :)
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
You could even do "msg:lower()" instead. Shorter and easier to read.