So basically, my question is as stated. How can I tell the amount of data units something takes up? I'm trying to use Data Persistence to save places when players leave my game.
(To check that out to see what my problem is, go here and try to build something that's decent sized, leave, and come back. If you built enough, it shouldn't have saved)
Anyways, I know that I should probably use Data Stores for saving things that are this large, but I just want to make sure that my problem is what I think it is. If anyone could help me, or possibly leave an example script, that'd be awesome. Thanks in advance to whoever may help :P
There is no way to actually measure the amount of data units there are in-game
But, the closest thing is using the DataCost member of instances. This can read how much data(in units) will be used while saving with Data Persistence, but it cannot be used in a script
or localscript
- only through the Command Bar or Plugins.
To get around this, then just use DataStores as they have pretty much unlimited storage and you won't lose data.
But there's a setback while using DataStores to save instances, you cannot directly save Instances through DataStores.. so you're going to have to constuct a lua compiler
(make a table inside of the main table for every instance you're saving, this table will include every property of the instance). Then when the player joins, iterate
through these tables and create instances according to the saved data.
Locked by Goulstem and Redbullusa
This question has been locked to preserve its current state and prevent spam and unwanted comments and answers.
Why was this question closed?