Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do I use a dictionary with a table key?

Asked by 4 years ago

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

Log in to vote
0
Answered by 4 years ago

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.

Ad

Answer this question