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

How to convert text in textbutton to lowercase?

I am trying to make a search gui. If you want to search for something, there are multiple ways you can type it (Shop, shop, sHop, etc.) The first solution that came to my mind is to convert all the text into lowercase so it would be easier to use. Is there a way to do that?

4 comments

0

string.lower()

0

you can use the :lower() to convert everything to lowercase

0

string.lower(string) would do that.

0

Please do more research on string manipulation as this is not a request site. If you want to become good at scripting make sure you use the roblox developer hub.

1 answer

✓ Accepted answer

Lets say that your string value is "ShOp" and you want to print it to the output. You would do this with this script:

local text = "ShOp"
print(string.lower(text)

The same output will be returned if you use this script:

print(string.lower("ShOp")

In case you are wondering, the output is

shop

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