- What are tables used for?
- How are they used in the actual game world of roblox?
- Are good for saving data into a data save?
Tables are extremely important! Tables are used for storing info like multiple values. An example of usage is using GetChildren(), GetChildren() returns a table of children, if you wanted to make every part in the game transparent then you would be using GetChildren() and be using a table at the same time. Let’s say you wanted to get all the player’s surviving one round; how would you do that; we can’t use a variable that isn’t set to a table because that can only store one value… Oh right! We can use a table to store all of the players who survived because they can store multiple values and can be looped through. Tables are good at saving data because you can store multiple values in a datastore rather than making a lot of new datastore.
I haven’t really thought of it that, I’ve always had trouble putting tables into use.