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

getting the amount of characters in name?

Asked by 5 years ago

is there any way to get the amount of characters a player has in their name into a number, for example is the player name is slayer then the amount would say 6, if so could anyone link me to some explanation about it or tell me here

1 answer

Log in to vote
1
Answered by
royaltoe 5144 Moderation Voter Community Moderator
5 years ago
Edited by DeceptiveCaster 5 years ago

stringLength = string.len("hello world")

This would print the number of characters in the string hello world and put it inside the stringLength variable. stringLength is now 11

Like bash said, you can also do print(#("hello world")) '#' meaning number of characters within the string

1
len() is irrelevant you can use the length operator on strings DeceptiveCaster 3761 — 5y
0
ah good to know thanks royaltoe 5144 — 5y
0
well it does work but not for what i needed it to but ill accept anyway since i guess i wasnt clear enough Gameplayer365247v2 1055 — 5y
0
What did you need? royaltoe 5144 — 5y
Ad

Answer this question