How to convert a string into a table?

This is a pretty simple question.

Let’s say I have a string that says:

"Johnny, Phillip, Bob"

How would I turn that string into a table:

{"Johnny", "Phillip", "Bob"}
local stringToConvert = "Johnny, Phillip, Bob"
local newTable = string.split(stringToConvert, ", ")
5 Likes

I’ll test it tomorrow morning