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

Check if all characters are available in the message?

So basically what i'm trying to do is to try and check so the Player Message has all characters so for example If my message has a capital T itll still run and if it has a lowercase T itll still run I have my attempt here:

This is just the snippet of code i'm having issues with.

if Msg == string.match("Test","%.") then
		print("test")
	end

Also I would like to add the code doesn't run no errors in the output either.

1 comment

0

no, bad

1 answer

string.match(str, pattern, init = 1) returns the match found if any. nil if no match was found.

What you can do is either lower the message to check if it equals a word in all lowercase.

if Msg:lower() == "test" then -- you can also do Msg:upper() == "TEST" 
    ...
end

What these codes are doing is lowercasing the message and seeing if it equals "test".

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