This is my script, I don't know how to make it loop for as many values as there are in the table, pls help!!!
local TBL = {23, 34, 23, 123, 54, 23, 5432} for i = 1,7 do print(TBL[i]) end
You need to use this operator: #
it does exactly want you want to do, say I had a table like this: local Numbers = {23, 545, 235, 4543, 343343,2434,34343,43434343}
and I wanted to know how many values there are in Numbers
, I would go like this #Numbers
and that would return a number, this can also be used in strings, it counts all the characters and returns a number of characters, like this: local Line = "Hi. my name is SuperSamyGamer and I code" print(#Line)