How Do You Put All Strings/Names On A Table To A Comma List

For example:

local tableExample = {"DABABY", "Downrest", "Water", "Bruh"}

--I WANT TO SOMEHOW TURN IT INTO THIS
--"DABABY, Downrest, Water, Bruh"

I wanna know how I can do that. I can’t really think of a way on how to achieve this, and I’m not that familiar with string functions.

So basically you want to just concatenate all of it?
You could either use a loop but that would be a waste of time since concat exists.

Try this:

local tableExample = {"DABABY", "Downrest", "Water", "Bruh"}

--I WANT TO SOMEHOW TURN IT INTO THIS
--"DABABY, Downrest, Water, Bruh"

local ConcatenatedTable = table.concat(tableExample, ', ')
print(ConcatenatedTable)

DABABY, Downrest, Water, Bruh

1 Like

I actually did not know that existed, thanks so much!