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?
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?
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)
It is Currency.Changed not Currency.Updated
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)
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”
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.
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
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.
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.