What do you want to achieve? When I use through the event {Where they give money} I do not save in the game
What is the issue?
local dataStore = game:GetService("DataStoreService")
local Data = dataStore:GetDataStore("Stats")
game.Players.PlayerAdded:Connect(function(PLR)
local Money = Instance.new("NumberValue")
Money.Name = "Money"
Money.Parent = leaderstats
local MoneyValue = Data:GetChildren(PLR.UserId.."-Money")
if MoneyValue ~= nil then
PLR.leaderstats.Money.Value = MoneyValue
end
game.Players.PlayerRemoving:Connect(function(PLR)
local sussec, errorMsg = pcall(function()
Data:SetAsync(PLR.UserId.."-Money", PLR.leaderstats.Money.Value)
end)
What solutions have you tried so far? I look in Tutorial DataStore In youtobe its not help me.
Iām having major issues with the datastore myself. On code that was working fine.
They must be changing something. Make a back up of your scripts before wiping them out.