Need help with string manipulation please!


Let’s say I have a string:

local string = "127"

I want to know how I could take the length of the string and set the numbers according to the textlabels.
I am not familiar and don’t really understand how to get this solution from the wiki, maybe someone here can help and explain.

Don’t use string as a variable name.

local s = "127"
local length = string.len(s)

for i = 1, length do
	ScreenGui.Frame["TextLabel"..i].Text = string.sub(s, i, i)
end
2 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.