Printing list outputs memory location

Whenever I try to print a list, E.g.

list = {"Player1", "Player2"}

All that outputs is “table: 0x5b26a50d99232d76”
Any help to this would be most appriciated. Thanks!

Second result in google

Since your not printing a actual value of the table, you will get that. However, if you print a value like this:


then it will print the first value. I recommend you read a bit about tables

Doesn’t work; I have it enabled and it still just outputs the memory location.

It does that within the studio or within the DevConsole in the game?

If in the studio, seems like a studio bug.

Theoretically there’s a workaround by printing the contents of the table by using a recursive function, such as this; (thanks copilot)

function printTable(table, indent)
    if not indent then indent = 0 end
    for k, v in pairs(table) do
        formatting = string.rep("  ", indent) .. k .. ": "
        if type(v) == "table" then
            printTable(v, indent+1)
        elseif type(v) == 'boolean' then
            print(formatting .. tostring(v))
            print(formatting .. v)

Can’t you just do print(table.unpack(list))

Never mind; after a studio update and fiddling with log mode, it works.