Ranking value for the game

hi guys I’m trying to make a LeaderBoards, I would like that when the player has 1000 Cash they become 1k… and 1000k a 1M, I looked for information in …

but I haven’t found anything about it, what can I do?

2 Likes

You could check if the currency value is greater than or equal to 1000 then, if it is change the value to 1k eg.

Current_value.Changed:Connect Function()

if currency_value >= 1000 then

Currency_value = currency_value/10

Currency_value = Currency_value… “k”

End
End)

You can do the same with 1M using an else statement. (Note I’m assuming your using a string value)

2 Likes


something is missing ?
and the first time I try to do something like this…

1 Like

It is Currency.Changed not Currency.Updated

1 Like

x 245

Sorry for the confusion. Here is the updated script:

Current_value.Changed:Connect(Function()

if currency_value >= 1000 then

Currency_value = currency_value/1000

Currency_value = Currency_value … “k”

End
End)

2 Likes

I also found a good tutorial on this:

https://m.youtube.com/watch?v=S8ajqdPu4nk

Hope this helps :grinning:

1 Like

Just do a little internet search.
Need Help Applying a Number Abbreviation Function into a Money Gui - Help and Feedback / Scripting Support - Developer Forum | Roblox
How do I shorten this numbers? - Help and Feedback / Scripting Support - Developer Forum | Roblox

also, this will never work. ... is not an operator. .. is though.

-- this would work
Currency_value ..= “k”
1 Like

This was covered plenty of times before

keep in mind there are plenty of ways to do it, but this would be the recommended version of that.

1 Like


I inserted the script into my leader but it doesn’t work, what did I do wrong?

I think its because the value you used for the leaderboard is a number value

and what kind of value should I use?

I think you need to use A string value if you can

1 Like

Can you edit the script for an IntValue?

No. You need to use a string value. Integers cannot contain letters.

You could maybe make the actual value a string, and then add an int value inside of the string value with the actual number value. That way the string will show on the leaderboard and the int value won’t.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.