Help with DataStore Editor plugin

Oh, got it. You can leave your code how it is. In the plugin key section, type the key Player_1739689185

image

Here where you put “test”

1 Like

and in the script and the datastore name what should I put? :scream: :frowning:

This part is correct:

image

Because you are using this datastore.


image

Here where you put “test”, it should be Player_1739689185

DO NOT CHANGE YOUR CODE, LEAVE IT AS IT WAS.

1 Like

Got this, but how can I access to this? gold int value

local Gold = Instance.new ("IntValue", playerFolder)
Gold.Name = "Gold"

image

This 0 should be your gold.

I changed it to 150 in datastore plugin and in the game print it is still 0

and i create a new instance to test if it really was the gold and this is not the gold

I can’t understand, you should put Player_1739689185 here:

image

Oh sorry about that im using the id of my other account

i did it and it show no data

Have you played the game with that account?

yes and still show no data :frowning:

That’s weird, try to create some data (a number only) and play the game with that account.

No, you need to put the placeid. If you go to the game’s homepage on roblox, the link to the game will have the id in it.

For example, this is the link to adopt me:

https://www.roblox.com/games/920587237/Adopt-Me?refPageId=791b5050-a854-46d3-a374-148dc2415c0b

So the placeid for adopt me is

920587237

So the name should still be “playerGold”, but the Set Place ID should be your game id.

1 Like

still in 0 i dont know what’s wrong why it is not getting the changed gold value?

image

image

script:

-- DataStore System
local DataStore = game:GetService("DataStoreService")
local PlayerData = DataStore:GetDataStore("playerGold")

game.Players.PlayerAdded:Connect(function(player)
	local playerFolder = Instance.new("Folder", player)
	playerFolder.Name = "Data"

	local Gold = Instance.new("IntValue", playerFolder)
	Gold.Name = "Gold"

	-- Load data
	local data
	local key = "Player_".. player.UserId
	local success, errormessage = pcall(function()
		data = DataStore:GetAsync(key)
	end)

	-- if success
	if success then
		Gold.Value = data
	elseif data == nil then
		Gold.Value = 0
		print("gold has been saved.")
	else
		print("error saving data, error saving data!!!")
		warn(errormessage)
	end
end)

Wait can you put a screenshot of what you put into the plugin.

I just updated the pic from my comment above, is that pic the one you need? i changed this value from 0 to 150

I’m sorry I have never used this plug in before. So you put the place id and you put the data store name?

yeah, but it is not show the data from my database, I seriously believe that I will dedicate myself better to programming it xD

1 Like

Try using this video

The truth is that this video does not clarify anything, I saw it and did not learn anything … :frowning: I seriously prefer to create the database in a script, I see it faster and easier to do… :frowning: