Table dictionaries not working?

This just started happening today.

Basically when I do a print(#Table) on a table that labels it’s values as dictionaries it just prints out 0




However if I just use normal table values without a dictionary, it works just fine:



Is there a reason for this? It’s breaking my game’s datastores. I tried this in multiple of my places, but still no luck. Also there’s no difference when used on a local or regular script.

1 Like

#table” works if there’s proper number indexes. You’re using strings as indexes.

It’s always been like this. # returns the highest continuous integer key.

local function GetNumElements(t)
local n = 0
for _ in next, t do n = n + 1 end
return n

Lua manual:

i just realized i was doing dumb mistake