I'm trying to make a code input GUI, and it checks if you have entered 4 or more characters. I don't know how to do this, would anybody be able to explain it to me? I am aware it uses math or something like that, but unsure of it's exact usage.
✓ ANSWER ACCEPTED
Checking if a value has "x" characters?
2 answers
✓ Accepted answer
It's super easy. # gives you the length of a string (in number of characters). Therefore, you can just do this:
if #string >= 4 then
another way to do this is to do
if ('string'):len()>=4 then
--block of code
end
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
if #script.Parent.TextBox.Text >= 4 then