Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Can someone help me abbreviate leaderboard numbers?

Asked by 5 years ago

Okay so I made a Datastore + leaderboard script and I need to abbreviate the numbers in it can someone help me with it?

script: `local DataStore = game:GetService("DataStoreService")

local ds = DataStore:GetDataStore("CoinsSaveSystem")

game.Players.PlayerAdded:connect(function(player)

local leader = Instance.new("Folder",player)

leader.Name = "leaderstats"

local Coins = Instance.new("IntValue",leader)

Coins.Name = "Coins"

Coins.Value = ds:GetAsync(player.UserId) or 0

ds:SetAsync(player.UserId, Coins.Value)

Coins.Changed:connect(function()

ds:SetAsync(player.UserId, Coins.Value)

end)

end)

game.Players.PlayerRemoving:connect(function(player)

ds:SetAsync(player.UserId, player.leaderstats.Coins.Value)

end)`

0
I SEE YOU greatneil80 2647 — 3y

Answer this question