How do I make a gui display short text of an int value?

Hi, I wanna do something like: If a value is 1,000 then the text label would display 1k else if it’s like 1,500 then the text label would display 1.5k.
Any solutions? Thanks.

you can check if the value is greater than a certain number and divide it accordingly like this:

local text= script.Parent.Text--wherever or whatever the intvalue is.
if text.Value >= 1000 then
local equation = text.Value/1000
script.Parent.Text = equation.."K+"
end
1 Like

This is called abbreviation. There have been multiple threads created about this. Next time try searching for what you want instead of creating a new thread.

This might help you.

text.Value can’t be >= 1000 because its a string not a number. Do tonumber(text.Value) which converts the stings into a number.

My problem is kinda same, and I searched for this, too, but I want like with decimals, like if your value value is 1,500 then it’ll display: 1.5k. and not 1k.

That should display 1.5 not 1k.

well, im not talking about the string. I was just showing a example. Im not talking about text. I was trying to tell him to get the value of what he wants to show then divide it accordingly to make it a abbreviation.

Thank you so much! It worked buddy!