So basically I am making a system that will do something like this, if you have 1,542 cash or something, it will show as 1.542 Thousand as what it says for your cash instead, so I am guessing I will need to check how many digits it is. Would string.len work?

8 comments

0

local num = 12345; print(tostring(num):len())

0

Do not use the len function. Use the length operator. #tostring(num)

0

https://scriptinghelpers.org/questions/23724/how-do-i-make-a-miners-haven-leaderboard found this a few weeks back to help with the same sort of question you have.

0

That was a terrible answer.

0

You could use tostring, then replace the dot with gsub. tostring(Num):gsub(',', '.')

1

@Phlegethon5778, it wasn't an answer, thus the reason it's a comment.

0

I was referring to the answer for the linked question. I'm not stupid.

0

Woah calm down guys. Anyway for the people who told me thanks!