Roblox Studio - How to make leaderstats save 2020

Аватар автора
Гейминговые Искусства
Roblox Studio - How to make leaderstats save 2020 Script: local dataStore = game:GetService("DataStoreService"):GetDataStore("MoneyData") starterMoney = 50 --This is the starter money game.Players.PlayerAdded:Connect(function(plr) local leaderstats = Instance.new("Folder") leaderstats.Name = "leaderstats" leaderstats.Parent = plr local money = Instance.new("IntValue") money.Name = "Money" --Put ur currency name here, mine is Money money.Value = dataStore:GetAsync(plr.UserId) or starterMoney money.Parent = leaderstats end) game.Players.PlayerRemoving:Connect(function(plr) dataStore:SetAsync(plr.UserId, plr.leaderstats.Money.Value) end)

0/0


0/0

0/0

0/0