A official way to turn a normal string into a table

Please follow the format in How to post a Feature Request

Be as specific as possible, give your post a clear and descriptive title, and focus on problems and use cases, rather than proposed solutions.

As a Roblox developer, it is currently too hard to …
turn strings into tables with one command

If Roblox is able to address this issue, it would improve my development experience because …
i would easily be able to make a animated text bubble icons with just a for i loop,

example:

local normString = "Hello"

normString = string.TurnStringIntoTableAsync(normString)

local resultingTable = {
[1] = "h"
[2] = "e"
[3] = "l"
[4] = "l"
[5] = "o"
}




2 Likes

i cant do a:

for i,v in pairs(s) do -- s = string

end

1 Like

What about string.split?

If you mean animating character by character like a typewriter, you can look into MaxVisibleGraphemes.

1 Like
string.split(s,[specific letter]) -- specific letter is where it splits at

will just split the string at specified letter!

1 Like

I can’t tell if you’re being serious or not. But I’ll give you the benefit of the doubt.

You can split character by character by using an empty string (“”) as a separator.

1 Like

it will return a table right? im not very good at the string.split thing, never rlly used it

i asked the official AI about it and it didnt really show anything that worked (bad ai :wilted_flower: )

1 Like

Yes it does return a table (you can always try it out for yourself).

For these types of questions, if you’re not sure something exists, create a topic in Help and Feedback > Scripting Support instead.

Oh, and by the way. The built-in AI is not the best for asking these types of questions. Use a popular one like ChatGPT or Gemini instead.

3 Likes

im in brazil so chat GTP is taking like, 10 minutes for a message to load :frowning: and gemini didnt rlly help either

1 Like

string.split gives u a table full of strings splitted by a string.
Example :

local myString = "One,2,three"
local myTable = string.split(myString, ",") -- comma seperated the strings in the string

print(myTable[1]) -- first index : One
print(myTable[2]) -- second index : 2
print(myTable[3]) -- third index : three
2 Likes

dawg what is this name :skull:

yea because pairs is a table iterator and strings aren’t tables

2 Likes

idk i just thought of the thing that sounded the most corpo

1 Like

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