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

How would I make a GUI display abbreviate leaderstats?

Asked by 4 years ago

Hello.

I'm looking to make a GUI that displays money and have been mostly successful, however, I have ran into 1 problem. I want the display to abbreviate the amount shown, for instance, rather then 1000000 it would say 1M.

Here is my current script.

local stats = game.Players.LocalPlayer.leaderstats:FindFirstChild("Wallet") --gets the leaderstat
script.Parent.Text = "£"..stats.Value -- displays

stats.Changed:Connect(function()
    script.Parent.Text = "£"..stats.Value --keeps it accurate
end)

Answer this question