[31.1] FormatNumber - A module for formatting numbers

Sorry for the late reply as I’m quite busy with my life.

Yep. It has been made as a GitHub repo now.
Blockzez/RobloxFormatNumber: Number formatting module for Roblox Luau. (github.com)

1 Like

Woop woop! Thank you :smiley:

I went ahead and made a pull request for some changes. The only important one is the project file; I understand if you excluded the src/init.lua if you wanted it to stay as a folder.

Hey.


Btw i use Simple ModuleScript because i can’t find out how to use main. Because im stupid


If someone can answer me it will be great :slight_smile:
Can i remove the Infinity thing so i can make the array bigger with like e+1000 or someting like that :slight_smile:
Or move it so i can have some bigger numbers :smiley:
Thx…

Unfortunately, the module can only format numbers in a range of the Lua(u) VM-native "number" data type (the maximum is ~1.8e+308) for now.

Oh, okay :confused: Then i will just try work with it :slight_smile:

Cool module, hope you keep this module updated!

Also please just have one public version, I hate trying to look for the newest version.
Its really a pain

Hello can I ask, is it possible undo the abbreviation like for example change the 12.5k back to 12500 with this module?

try with EternityNum 2 module, its available on Roblox Library.

add roman suffix will be good like 5 is V, 8 is VIII, 10 is X, 50 is C and etc.

Hi. Unfortunately, no, and I’m unlikely to add this.

Do you have any uses for this? Especially with abbreviations / compact notation. (which makes the implementing this kind of thing more brittle)

I strongly recommend to only format a displayable interface. (TextLabels .Text property, inside the print function, etc.)

It’s a nice module, I agree, but the method names are really unintuitive. Usually, when I write a script using a library, I can guess what the methods do by their names, but here it’s very difficult. What’s more, the organization is very different from the libraries usually found on Roblox, making implementation complex.
Otherwise, the functionalities are very interesting.

idk i just thought it would be cool to store a number as a formated string in data store incase it gets too big then unformat it when needed to be used for maths and stuff