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

Is there a possible way to print a set number in a string?

Asked by 5 years ago

For example if I have a string "hello" and I wanna print the 4th letter, how would I do that?

1 answer

Log in to vote
1
Answered by 5 years ago
s = "hello"
print(s:sub(4, 4))

See https://developer.roblox.com/api-reference/lua-docs/string

Ad

Answer this question