Anyway to print out every element of a table? Thanks
Yes, and that is with pairs().
http://wiki.roblox.com/index.php?title=Function_dump/Basic_functions#pairs
t = {a = 1, b = 2, c = 3} for i, v in pairs(t) do print(i..": "..v) end
You can use the table.concat()
inside the print
. Don't have to use the for
loop.
table.concat() page
print(table.concat(NameOfYourTable, ", "))
Output>>elements, in, your, table