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

How to make a money leaderboard change?

Asked by
itsJooJoo 195
8 years ago

So I have a leaderstats put in called CC (Cactus Coins, don't judge it.) and I want to make it so that if it's 1,000,000 it'll change to 1M instead of 1,000,000. And if it's a billion, make it 1B, and if it's 140 million, make it 140M rather than all the digits. How would I do that without calling hundreds of lines of code?

0
Ok, what I gave you was a function to shorten the numbers. You need a number to put into that function. Get the players Cactus Coins(really?) into the shorten function, and make whatever comes out be the stringValue. theCJarmy7 1293 — 8y
0
Ok alright I was a little bit confused now I get it. Thanks dude! (Also who's gonna be laughing when in 2 years from now Cactus City is gonna be so popular with its trendy cactus coins? HMMMM?) itsJooJoo 195 — 8y

2 answers

Log in to vote
0
Answered by
theCJarmy7 1293 Moderation Voter
8 years ago
01local letters = {
02    "K",
03    "M",
04    "B",
05    "T",
06    "QD",
07    "QN",
08    "SX",
09    "SP",
10    "O",
11    "NO",
12    "DEC",
13    "UND",
14    "DUOD",
15    "TRED",
View all 46 lines...

Then do what firedDusk said, use a StringValue when displaying the numbers

0
But afterwards it errored saying it was trying to perform arithmetic on a StringValue and stopped working... itsJooJoo 195 — 8y
Ad
Log in to vote
-1
Answered by
FiredDusk 1466 Moderation Voter
8 years ago

Well when changing to 1,000,000 that uses a Number Value or Int Value. But if you are wanting to change it to 1M or 1B then you use a string value.

Answer this question