Datastore for workspace or the game itself?

Is there a way to save the whole game while a player is on it ?. If its not clear let me give an example, minecraft survival server save buidlings, mobs, particles, and more so i want to do the same with my game, i want to save all the stuff like: Buildings, Affected terrain by player and scripts and more like minecraft survival servers.

Another example would be this: lets say a volcano erupts and it damages terrain, trees, houses and more so i want all that changes that the eruption did to save and appear when a new server starts without going into roblox studio and adding all by my self.

I’ve been thinking of an external way, like an online sheet that saves all parts info, for this i would need HTTPService but i don’t know if this would be possible.

1 Like

You’d have serialize all of the objects you want to save and insert them into tables for the data store.

--example: Getting CFrame Coordinates for an objects
local OBJECT_CFRAME_COORDINATES = { Instance.CFrame:GetComponents() }
-- 'OBJECT_CFRAME_COORDINATES' now contains the object's CFrame.
-- when you load in the objects, retrieve an object's data and create it based on what content is saved
--example: Serialization Format
    ['ObjectType'] = "Wood",
    ['ObjectCFrame'] = <CFrame>,
    ['ObjectInventorySlot'] = 2,
    ['ObjectChunkParent'] = 5,

You can look at this post for more info:

1 Like

The issue with that is datastore limitations. I believe it’s 4 thousand entries on a table?

Component Maximum Number of Characters
Key 50
Name 50
Scope 50
Data 4,000,000

Welp. I mean if it fits, you can try.