Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How would I get the other values of a multidimensional array?

I am trying to get the Level Name and Level Status but I haven't found out how to get those with just the level id (ex. "Level1" or index [1] of the 2nd array). Does anybody know how to do this?

local Levels = {
	{"Level0","Level 0","Safe"},
	{"Level1","Level 1","Unsafe"},
}

1 answer

Multi-dimensional arrays are just arrays of arrays.

Indexing the 2nd element will provide you with an array, which you may index as well:

print(Levels[2][1]) --> "Level1"

This discussion is preserved as it was. New answers, comments, and votes are closed.