TDS type datastores with datastore2

hello so ummmm i want to achieve trying to make something like tds
how would i make it so datastores save, coins, XP, towers?
i need help. i tried making one. no result, no output

local Players = game:GetService("Players")
local ServerScriptService = game:GetService("ServerScriptService")
local Workspace = game:GetService("Workspace")

local DataStore2 = require(ServerScriptService.DataStore2)

-- Combine every key you use. This will eventually be the default, but for now read the "Gotchas" section to understand why we need this.
DataStore2.Combine("zillyzestycontentsharerwooooooow", "equippedtowersyouloser")
Players.PlayerAdded:Connect(function(player)
	local noobiesStore = DataStore2("equippedtowersyouloser", player)
	--pain!
	local t = noobiesStore:GetTable({
		Points = 100, --starting.
		XP = 0,
		Noobies = {
		  "Scout"
		}
	})
	for i,v in ipairs(t) do
		local val = Instance.new("StringValue",Workspace)
		val.Name = i
		val.Value = v
		print(i)
		print(v)
	end
	end)
1 Like

i guess i posted this too late… never will find a solution with shop/checking and stuff like that :pensive:

This video may help, check through this series that this youtuber did and you may find your answer

im questioning this about datastore2, any way possible to use datastore2 instead of making a new one?

Sorry but I dont know about datastore2

oh, thats upsetting.
3333333333333

em
nope nevermind im a idiot i already found out a solution easily and stuff like that. made it use pairs instead of ipairs and did stuff.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.