The title says it all, if I save a table, do all the items within the table load in the correct order? If I can't do that, what can I do that will help me load in correct order?
--No script provided-- example,
local tbl = {1,2,4}
when saved the tbl, will it load in exact same order, 1,2,4 or will it just take like... 2,4,1
There are two types of tables; arrays and dictionaries. Arrays are the "normal" tables, where the keys are automatically assigned to integers (e.g. 1, 2, 3, 4), and because of this they always keep their order. So, your example table (which is an array) will keep the order when being loaded or saved through datastore.
However, if your keys are not integers, like in dictionaries, there will be no order in the table. This is fine though since dictionaries allow you to better categorise your tables. My answer here outlines how you could use dictionaries with datastores for a save system.