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

How to get the player in all lowercase?

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?

2 comments

0

you would need to use :sub(), idk how to use it myself but i got help with it in one of my scripts

0

Lowercase the name and check if it matches the text in all lowercase

1 answer

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!

2 comments

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?

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()"

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