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

How do I use a dictionary with a table key?

How do I use a dictionary with a table key? I am lost on how to make this work.

For example;

Local Cells = {}
Cells[{x,y}] = part

print(Cells[{1,2}].Name)

1 answer

Well, I solved this on my own by finding out that tables are assigned different valves despite the same hash. So I replaced the table with table.unpack(table) to store the part under the raw table values. I wrote this for anyone who might also have this problem.

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