Needs help to crate two leader stats value for example: Stage value and Points Value? my script just showing Stage Value.I hope to edit my script because I am not good at English: Note: this script auto saving players data
local DataStore = game:GetService("DataStoreService") local ds = DataStore:GetDataStore("StageSaveSystem") game.Players.PlayerAdded:connect(function(player) local leader = Instance.new("Folder",player) leader.Name = "leaderstats" local Stage = Instance.new("IntValue",leader) Stage.Name = "Stage" Stage.Value = ds:GetAsync(player.UserId) or 0 ds:SetAsync(player.UserId, Stage.Value) Stage.Changed:connect(function() ds:SetAsync(player.UserId, Stage.Value) end) end) game.Players.PlayerRemoving:connect(function(player) ds:SetAsync(player.UserId, player.leaderstats.Stage.Value) end)
What you can do Is copy line 7 and 8 and change there names to points.