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

How to get individual character's in a string?

Currently making a dialog system and i would like to know how can i get each character individually in a linear style

1 answer

✓ Accepted answer

It's a little hard to determine what you're actually looking for, but I'm assuming you want to iterate throughout each character in the string and do whatever with it.

local String = 'ok'

for i = 1, #String do
	print(String:sub(i, i))
end

1 comment

0

Yes! this is exactly what i needed!

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