local DataStoreService = game:GetService("DataStoreService")
local T1 = DataStoreService:GetDataStore("SavePoints")
game.Players.PlayerAdded:Connect(function(Player)
local leaderstats = Instance.new("Folder")
leaderstats.Name = "leaderstats"
leaderstats.Parent = Player
local Point = Instance.new("IntValue")
Point.Name = "Points"
Point.Parent = leaderstats
end)
game.Players.PlayerRemoving:Connect(function(player)
pcall(function()
T1:SetAsync(player.UserId.."-Points",player.leaderstats["Points"].Value)
print("Saved")
end)
end)
Is anything wrongs with it? because each times i leave and join again it'll reset my points back to 0 ! and not even a single saves in it? btw i already enable Studio Access to API Services

1 comment
Didn't work :(