I need some help with the concept of saving players’ tycoons, they can build the tycoons themselves, how would I be able to save and load up their progress?
My original concept would be, when the player leaves, their folder will be parented to ServerStorage, and there would be used scripts to save without needing to save their buildings at random moments. But I still need to find out the concept of saving everything.
I have a tycoon, and I think the easiest way, is to make a int variable for each tycoon part inside player folder, and when the player unlocks the part, the variable changes to “1”.
And then just save it with a table.
And then when player picks a tycoon, load all the information and put the things that are active on the variables.
How would I manage to move the building and its items to where the player chooses? Also would I have to overwrite everything because the player can move the items too.
When the player leaves, get every part he placed, save it’s CFrame, color, name, anything else important, and when he joins, clone the [name] from server storage, TP it to [CFrame] and change its properties.
Best way would be to save each unique item and the CFrame of the primary part. Saving specific part properties is significantly more data and can eat up data limits pretty quickly.
I assume you already have some kind of storage for every item in the game, just make sure they all have unique names.
For moveable items save the CFrame relative to the plot’s CFrame using CFrame:ToObjectSpace(). This lets you know CFrame relative to how the plot is positioned. And when you load in the data you can just do something like Object.CFrame = CFrame.plot * savedCFrame. So now no matter how the plot is orientated or positioned the relative positions of objects within the plot are maintained.