How to edit datastore?

Hello there! I used a free model to have a datastore since im not to familiar with datastore stuff. But i want to be able to edit my data store with the datastore v3 editor, but it asks me for a scope and name and key. could you help me try to find the key and stuff?
Script:

local statsDS = DSS:GetDataStore("statsDS")

game.Players.PlayerAdded:Connect(function(plr)
	local Afolder = Instance.new("Folder") --created a new folder
	Afolder.Name = "Artil"
	Afolder.Parent = plr

	local Blood = Instance.new("NumberValue")
	Blood.Name = "Blood"
	Blood.Parent = Afolder
	Blood.Value = 0

	local DefaultKnife = Instance.new("NumberValue")
	DefaultKnife.Name = "DefaultKnife"
	DefaultKnife.Parent = Afolder
	DefaultKnife.Value = 1

	local DefaultGun = Instance.new("NumberValue")
	DefaultGun.Name = "DefaultGun"
	DefaultGun.Parent = Afolder
	DefaultGun.Value = 1
	
	local Knife2= Instance.new("NumberValue")
	Knife2.Name = "Knife2"
	Knife2.Parent = Afolder
	Knife2.Value = 2
	
	local Tokens = Instance.new("NumberValue")
	Tokens.Name = "Tokens"
	Tokens.Parent = Afolder
	Tokens.Value = 0
	
	local data

	local succ, err = pcall(function()
		data = statsDS:GetAsync(plr.UserId.."-stats")
	end)

	if succ then
		print("success")
		if data then					--if there was some data then
			print("Got the data from the player datastore")
			Blood.Value = data[1]
			DefaultKnife.Value = data[2]
			DefaultGun.Value = data[3]		
			ChromaDarkBringer.Value = data[4]	
			Tokens.Value = data[5]
		end
	else
		print("There was an error while checking: "..plr.Name)
		warn(err)
	end

end)


game.Players.PlayerRemoving:Connect(function(plr)
	print("Player is leaving the game!")
	local Blood = plr.Artil.Blood.Value
	local DefaultKnife = plr.Artil.DefaultKnife.Value
	local DefaultGun = plr.Artil.DefaultGun.Value
	local Knife2= plr.Artil["Chroma DarkBringer"].Value
	local Tokens = plr.Artil.Tokens.Value
	print("Got all the values")


	local data = {Blood, DefaultKnife, DefaultGun, Knife2, Tokens}

	local succ, err = pcall(function()
		statsDS:SetAsync(plr.UserId.."-stats", data)
	end)

	if succ then
		print("Succesfully saved the data!")
	else
		print("There was an error while saving player leaderstats!")
		warn(err)
	end
end)

The key is the unquie identifier of your data. The key here seems to be plr.UserId.."-stats" The name of the dataStore here is statsDS The items your saving in this script are in within the table data They are Blood.Value = data[1] DefaultKnife.Value = data[2] DefaultGun.Value = data[3] ChromaDarkBringer.Value = data[4] Tokens.Value = data[5]

1 Like

Would i Enter the user id in “UserId” so that i can edit it?

I have never used the dataStore editor before. Wish I could help.

oh alrighty thanks fgor the help!

This video should help:

If you’ve had no success try entering:

NAME: statsDS/playeruserid – playeruserid needs to be an actual user id i.e. yours
SCOPE: LEAVE EMPTY

then when you are in, just type whatever for the key like type “1” then if you have data, you should see it

of course this is how I know how to do it with my ds2 idk if it will work for you

Let me know if it works

hmm doesnt seem to work for me, also sorry for not responding earlier