I have seen module that converts objects to table and you can save it, the problem is I heavily do not understand how I would even start to script a data saving system for plots or how data service works anyway. I have tried to understand but I can’t
I want plots like this:
when player joins, it loops through to see if plot taken. if not it gives player that plot. ONLY problem is that, If I were to build something on my plot, or grab something on my plot, saving isn’t implemented. Once you leave then come back your plot is just as empty as before.
I want a plot system that saves every single property of a part, then to load it back on the plot when the player joins
You can do that by taking a object’s position and rotation then subtracting the plot offset from those values. Then insert some identification and the objects position and rotation with the offset subtracted into a table and store that table
how do I load and save it table. I am planning to make the table save when player leaves, after it saves clear plot, and when player join, it loads table. But how do I store table?
saveTable = {}
for i, item in plotfolder:GetChildren() do
table.insert(saveTable, {itemtypehere, itemlocationrelativetoplotcentrehere})
end
-- SetAsync(player.UserId.."_plotsave", saveTable)
GetAsync will return a table of the format
{{itemtypehere, itemlocationrelativetoplotcentrehere}, {itemtypehere, itemlocationrelativetoplotcentrehere}, etc}