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

Can tables be set as keys within a table and can also be saved?

Asked by 5 years ago

Kinda hard to explain so I'll just use an example:

local Table = {}
local Key = {1,2,3}
Table[Key] = "Yeet"

Using all that data saving shambles, will the data save? Because I know certain data types can't be saved such as ObjectValues and ColorValues

1
ObjectValues and ColorValues both can be saved, in a stringvalue or in an intvalue, and in a function you can set e.g the Colorvalue of a part to the value of the stringvalue/intvalue Miniller 562 — 5y
0
Also, there is even a special way to save ColorValues: With a Color3Value. And there is also ObjectValue, I don't know why you think you can't save them Miniller 562 — 5y
0
Please don't spread misinformation. User#25115 0 — 5y
0
Userdata cannot be saved. User#25115 0 — 5y
0
Marmalados, yes, you can use tables as keys. Any type other than nil can be used as a key in Lua. However, if you're looking to save data in datastores, it won't work. User#25115 0 — 5y

Answer this question