#How do I make textboxes not case sensitive?

1 messages · Page 1 of 1 (latest)

thick badger
#

I'm making a system where you can type certain 'ingredients' in a textbox and it'll give an outcome but I seem to have a problem with case sensitivity.. Is there a solution?

local fText = {"Flavorless", "Bloxilicious"}

f11.FocusLost:Connect(function(enterPressed)
    if enterPressed then
        if f11.Text:match(f[1]) or f22.Text:match(f[1]) then
            gui.Flavor.Text = fText[1]
end
misty hearth
#

do string.lower()

#

if string.lower(f11.Text:match(f[1])) or string.lower(f22.Text:match(f[1])) then

#

u can also do string.upper

thick badger
#

20:17:39.130 Players.NorthLMK.Backpack.Bubble.LocalScript:27: invalid argument #1 to 'lower' (string expected, got nil)

#

same result for string.upper

#

Players.NorthLMK.Backpack.Bubble.LocalScript:27: invalid argument #1 to 'upper' (string expected, got nil)

#

How do I make textboxes not case sensitive?

thick badger
misty hearth
#

f11.FocusLost:Connect(function(enterPressed)
if enterPressed then
if f11.Text:match(string.lower(f[1])) or f22.Text:match(string.lower(f[1)]) then
gui.Flavor.Text = fText[1]
end

#

mb it was like this

#

u should read on the docs to learn strings