How should I go about checking if a object value is for example 11500 then portray as "11k+" in a text string?

Despite this being simple I can’t think up a solution, I also don’t know what this functionality is called so I couldn’t find any similar questions.

I believe it may have something to do with math.floor but instead of making guesses, I would appreciate any guidance for this seemingly easy problem

local function TranslateToK(num)
  return tostring(math.floor(num/1000))..'k'
local value = 11500
local thousands = math.floor(value / 1000)
local str = tostring(thousands).."K+"

This might work properly, all you have to do here is to count the thousands

1 Like