Getting the last value of a table

You heard the title, how would I get the last value of a table? Now I’m not talking about any normal array, that starts at 1, what if the indexes are offset? For example, how would I get the last value of this table.

local _table = {
    [6] = "Hey",
    [7] = "Hi",
    [8] = "Hello",
}

I heard it was possible using next, but I don’t remember how.

1 Like

listen to the guy below this is not a good solution

2 Likes

Just do

Table[#Table]
3 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.