Using data store 2 to store a wide array of different data points

I’m trying to learn to use DataStore2, and I’ve got a million questions that don’t seem to be brought up/examples of on the forums.

Main one at the moment is in my previous games, I’d store players data in a table like this

return {
	-- Main Data
	Cash = 123456789,
	
	FavouriteColor = {83, 209, 255},
	
	Codes = {},
	
	-- House Data
	House = 'Default',
	
	Houses = {
		['Default'] = {
			Exterior = {},
			Interior = {},
			Furniture = {}
		},
	},
	
	Furniture = {},
	
	-- Character Data
	Character = {
		Name = '',
		Age = 'Adult',
		HatAccessories = {},
		HairAccessories = {},
		FaceAccesssories = {},
		NeckAccessories = {},
		ShoulderAccessories = {},
		BackAccesssories = {},
		WaistAccesssories = {},
		Face = '',
		Shirt = '',
		Pants = '',
		Color = 'Light orange',
	},
}

So now if I wanna move to DataStore2, would I do it like this?

local DefaultData = require(script.DefaultData) -- The table I show above

DataStore.Combine('Data', 'Cash', 'FavouriteColor', 'Codes', 'House', 'Houses', 'Furniture', 'Character')

function DataManager.Load(player)
	local UserData = DataStore('Data', player):Get(DefaultData)
end

Or do I need to do something different cause I’m using tables inside tables, etc. Another problem I fear is in the past I had problems where if I added a new data store value, players with previous data stores wouldn’t get the new values, as they would load the older version of a data store table. Will these issues occur with DataStore2? Any help :weary:

My knowledge is at a minimum when it comes to DataStore2. But with programming background, tables in tables being saved does not really matter as those other tables are apart of the one big table.

If you save the table, it should save all the others tables in that table.

Sorry if this doesn’t help.

You might wanna send the guy a DM on Twitter, he helped me out with a similar issue. I don’t know if he is still active though.