local Data = game:GetService("DataStoreService"):GetDataStore("ThrowsDataStore")
game.Players.PlayerAdded:Connect(
function(plr)
local folder = Instance.new("Folder", plr)
folder.Name = "leaderstats"
local Throws = Instance.new("IntValue", folder)
Throws.Name = "Throws"
local dataLoad = Data:GetAsync(tostring(plr.UserId))
local success, err =
pcall(
function()
myThrows = Data:GetAsync(tostring(plr.UserID)) or 0
end
)
if success then
Throws.Value = myThrows
else
end
end
)
game.Players.PlayerRemoving:Connect(
function(plr)
Data:SetAsync(tostring(plr.UserId), plr.leaderstats.Throws.Value)
end
)
Its just not saving. In one of my other questions they said cause the playerremoving sometimes wont work? can someone find the problem in it?
