Why no get the length of table?

I dont know why this is not giving the length of the table. (i think its cuz its a dictionary but idk how to get length of it)

local itemsTotal = getToolConfig.itemsTotal -- a table
findTemplate:WaitForChild("Quantity").Text = #itemsTotal.."/"..Quantity
11 Likes

What does the table look like, it depends. I don’t know the difference between tables before I see them lol

4 Likes

image

you mean like this?

2 Likes

image

also this is if u wanted to see

2 Likes

are you updating the text of the quantity textlable every time a item is added to said table?

1 Like

yeah, thats what im trying to do but sadly it wont get the length of the table

1 Like

im trying to see everytime they spawn a supply box and the way i just thought i could do it is if i add them into a table. (still learning how to code)

1 Like

could you probably post your full script so I could try to better understand what the problem is? I’m a little confused on what the problem could be.

1 Like

yeah give me a second real quick

1 Like

make sure to keep updating the table. use rendered stepped function from run service

2 Likes

try tostring(#itemsTotal)

(remove30characterrule)

2 Likes

that didnt seem to work

(30_characters…)

2 Likes

the table always updates when they click a button

2 Likes

does the output say anything?

(30char)

1 Like

the output doesnt say anything. and i also printed the table and it seems to show everything i added. but for some reason it wont get the length of the table.

Could you print out the table when the event fires? So we can see what the table looks like.

try printing #itemsTotal

(30char)

it prints out zero for some reason and when i print out the table this is what shows

image

I am confused, which table are you talking about, it shows two.

1 Like

the first one that i opened. dont worry about the other one

1 Like