Standard data store or Data store 2?

Just wana know if i should be using standard data store or data store 2.
Might be a stupid question…

Just depends on the use case, really

1 Like

Datastore2 isnt a different data store. Its a simple module that makes saving data using the standard data store easier. Overall though I recommend ProfileService since its customizable.

4 Likes

I’ve made a really simple standard data store for saving everything in a folder.

local dataStoreService = game:GetService("DataStoreService")
local dataStore = dataStoreService:GetDataStore("InventorySave")
game:GetService("Players").PlayerAdded:Connect(function(player)
	local data
	local inventory = Instance.new("Folder", player) -- wen player joins. Tools stored will be sent here
	inventory.Name = "Inventory"
	local success, errorMSG = pcall(function()
		data = dataStore:GetAsync(player.UserId)
	end)
	if data ~= nil then
		for i, v in pairs(data) do
			local twool = game.ReplicatedStorage.shoptools:FindFirstChild(v)
			if twool then
				local newTwool = twool:Clone()
				newTwool.Parent = inventory
				
			end
		end
	
	end
end)


game.Players.PlayerRemoving:Connect(function(player)
	local inventory = player.Inventory
	local invTable = {}

	for i, v in pairs(inventory:GetChildren()) do
		if game.ReplicatedStorage.shoptools:FindFirstChild(v.Name) then
			table.insert(invTable, v.Name)
		end

	end
	local success, errorMSG = pcall(function()
		dataStore:SetAsync(player.UserId, invTable)
	end)
end)

Is this the method i should be using for this purpose?

Seen profile service coming up more frequently, thanks for the info. Will consider using it.

1 Like

As others mentioned, it’s up to you, afterall you can script your own module or system for saving/processing data.
There are plenty of choices, ProfileService, DS2, etc. each of them has their own features, what I advise you to do, is to check each data store in part and try working with them on separate baseplates, see which one you’re mostly comfortable with and use it.

1 Like