Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

What is the name, scope and key for my datastore?

I bought the datastore editor plugin so i could reset data easier and change data but im confused what the name key and scope are for my datastore

local DataStoreService = game:GetService("DataStoreService")

local ChugsData = DataStoreService:GetDataStore("ChugsData")
local MoneyData = DataStoreService:GetDataStore("MoneyData")
game.Players.PlayerAdded:Connect(function(player)
	local leaderstats = Instance.new("Folder")
	leaderstats.Name = "leaderstats"
	leaderstats.Parent = player
	
	
	local Chugs = Instance.new("IntValue")
	Chugs.Name = "Chugs"
	Chugs.Parent = leaderstats
	
	local Money = Instance.new("IntValue")
	Money.Name= "Money"
	Money.Parent = leaderstats
	
	local data1
	local data 
	local success, errormessage = pcall(function() 
		data = MoneyData:GetAsync(player.UserId.."-Money")
		data1 = ChugsData:GetAsync(player.UserId.."-Chugs")

1 answer

local ChugsData = DataStoreService:GetDataStore("ChugsData") -- ChugsData is your datastore name for that local MoneyData = DataStoreService:GetDataStore("MoneyData") -- MoneyData is your other datastore name

idk what slope is but you dont need it to see data. (also not ordered datastore so dont check that)

key would be player.Userid-Money ex. 12345678-Money basically same thing with chugs

This discussion is preserved as it was. New answers, comments, and votes are closed.