Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How to get the player in all lowercase?

Asked by 5 years ago

Sorry about the title not really making too much sense! I wasn't too sure how to word it ok anyways heres what I mean

local LP = game.Players.LocalPlayer
local target = TextBox.Text

LP.Character.HumanoidRootPart.CFrame = target.CFrame

ok so lets say target text = "bob" but the target players name is Bob how would I make it so LP teleport's still?

0
you would need to use :sub(), idk how to use it myself but i got help with it in one of my scripts Gameplayer365247v2 1055 — 5y
0
Lowercase the name and check if it matches the text in all lowercase User#24403 69 — 5y

1 answer

Log in to vote
0
Answered by
Cyrakohl 108
5 years ago

Hey there so what we need to use to convert a string to lower case what we use is a function called "string.lower()" So here's a quick example:

local String = "STRING XDD"
print(string.lower(String))

Hope i helped you!

0
Hey! But wouldn't this only working assuming the target player's username is all lowercase? What about if their username isn't all lowercased? Infl_uenced 0 — 5y
0
What you can do is use string.sub and check the first Character weather it is lower case or upper case to detect if it is an upper case you can use "string.upper()" Cyrakohl 108 — 5y
Ad

Answer this question