You're probably trying to change an IntValue's value to string which will return an error. What you need to do is create a StringValue and make the other cash value off the leaderboard (not in leaderstats). When comparing you will need a code like this:
while wait() do
if numberCash.Value >= 1000000 then
stringCash.Value = string.sub(tostring(numberCash.Value),1,1).."M"
end
if numberCash.Value >= 100000 then
stringCash.Value = string.sub(tostring(numberCash.Value),1,3).."K"
end
if numberCash.Value >= 10000 then
stringCash.Value = string.sub(tostring(numberCash.Value),1,2).."K"
end
if numberCash.Value >= 1000 then
stringCash.Value = string.sub(tostring(numberCash.Value),1,1).."K"
end
end
NOTE: The script I gave you will only work with numbers up to 1 million. You will have to add more to make it work with bigger numbers.
If this worked for you or helped you, please like and accept this as the answer.
1 comment
Before posting a question, please read this: https://scriptinghelpers.org/help/how-post-good-questions-answers