The title may not make sense but what I mean is how would I change this 100000 to 100,000 or 100K on a UI element.
What might work
One way I thought I could do it was get the length of the number by using string.len() but I am not sure how to place the comma (or remove the second half and replace it with K, M, or B etc..) into the currency.
Example:
currencyLength = string.len(tostring(currencyExample.Value))
End
I could use string.sub() for indexing correct character and either add a comma or remove half and add a character but I am not sure how to do it.
if string.len(tostring(currency.Value)) == 6 then
string.sub(tostring(currency.Value), 3)
-- then shorten (this would just return 100 if currency had a value of 100000)
end
I saw this sort of thing in the zed nov tycoon kit where you can convert the currency from 1000 to 1K. I have looked through the scripts and have not found anything there though except a function that I can not find called ConvertShort.
Thanks for the help!

2 comments
Instead of using string.len, use the length operator "#". There's no need for string.len.
ok