I recently downloaded the DataStore Editor v3 (DataStore Editor - Roblox) I’m inexperienced at datastores and too small brain to understand the tutorial. Anyway, I’m having some issues using the plugin. Here’s part of my datastore code for context.
local serverStorage = game:GetService("ServerStorage")
local datastore = game:GetService("DataStoreService"):GetDataStore("PlayerSave")
game.Players.PlayerAdded:Connect(function(player)
-- Code
local syrupData,sacrficeData,moneyData,multData,expiredData,frozenData,spicyData,mapleData,goldData
local sucess,errormessage = pcall(function()
syrupData = datastore:GetAsync("syrup"..player.UserId)
sacrficeData = datastore:GetAsync("sacrfices"..player.UserId)
moneyData = datastore:GetAsync("money"..player.UserId)
multData = datastore:GetAsync("mult"..player.UserId)
expiredData = datastore:GetAsync("expired"..player.UserId)
frozenData = datastore:GetAsync("frozen"..player.UserId)
spicyData = datastore:GetAsync("spicy"..player.UserId)
mapleData = datastore:GetAsync("maple"..player.UserId)
goldData = datastore:GetAsync("gold"..player.UserId)
end)
if sucess then
if syrupData then
syrup.Value = syrupData
sacrifices.Value = sacrficeData
money.Value = moneyData
mult.Value = multData
end
end
end)
game.Players.PlayerRemoving:Connect(function(player)
local sucess,errormessage = pcall(function()
datastore:SetAsync("syrup"..player.UserId,player.leaderstats.Syrup.Value)
datastore:SetAsync("sacrfices"..player.UserId,player.leaderstats.Sacrfices.Value)
datastore:SetAsync("money"..player.UserId,player.leaderstats.Money.Value)
datastore:SetAsync("mult"..player.UserId,player.leaderstats.Multiplier .Value)
datastore:SetAsync("expired"..player.UserId,player.leaderstats.Bought.Value)
datastore:SetAsync("frozen"..player.UserId,player.leaderstats.Bought.Value)
datastore:SetAsync("spicy"..player.UserId,player.leaderstats.Bought.Value)
datastore:SetAsync("maple"..player.UserId,player.leaderstats.Bought.Value)
datastore:SetAsync("gold"..player.UserId,player.leaderstats.Bought.Value)
end)
end)
For the name I put PlayerSave and I put one of the data variables for key(ex: syrupData, spicyData, etc.). When I do this it just says “No Data”. Thanks for any help.