(If I made a mistake in the category, I’m sorry)
Hello, I noticed in the game that there are people who used cheats for a faster leveling process, I wanted to cancel them through the Data Store Editor V2 plugin, but it gives me nil all the time if I use the player ID
local datastoreservice = game:GetService("DataStoreService")
local datastore = datastoreservice:GetDataStore("test5")
local RS = game:GetService("ReplicatedStorage")
game.Players.PlayerAdded:Connect(function(player)
local leaderstats = Instance.new("Folder")
leaderstats.Parent = player
leaderstats.Name = "leaderstats"
local Money = Instance.new("IntValue")
Money.Parent = leaderstats
Money.Name = "Money"
local test1 = {}
local test2 = {}
local tableOfData
local success, errormessage = pcall(function()
tableOfData = datastore:GetAsync(player.UserId) -- key
end)
if success and tableOfData then
for key, value in pairs(tableOfData) do
print(key)
print(value)
Money.Value = tableOfData["1"]
test1 = tableOfData["2"]
test2 = tableOfData["3"]
end
else
print(tostring(player.Name) .." New Player!")
Money.Value = 0
end
--scripts, i don't want share full scritp
end)
game.Players.PlayerRemoving:Connect(function(player)
local tableOfData = {
["1"] = player.leaderstats.Money.Value,
["2"] = test1,
["3"] = test2,
}
local success, errormessage = pcall(function()
print(tableOfData)
datastore:SetAsync(player.UserId, tableOfData)
end)
end)
What do I need to change so that I can work with this plugin (I don’t really understand the tutorials for this plugin)
Should I use combine()?