How to make numbers more readable?

I will show you an example of what I want to achieve. For example we have the number 1000000 (1 Million) and I want a script to somehow convert it to 1,000,000 so it is more readable

You can use the solution that was given here

function format_int(number)
	local i, j, minus, int, fraction = tostring(number):find('([-]?)(%d+)([.]?%d*)')
    -- reverse the int-string and append a comma to all blocks of 3 digits
	int = int:reverse():gsub("(%d%d%d)", "%1,")
    -- reverse the int-string back remove an optional comma and put the 
    -- optional minus and fractional part back
	return minus .. int:reverse():gsub("^,", "") .. fraction
end

print(format_int(100000))

So yes, the person above me has the solution (I think) however, please do research on things before you make a topic, I know personally that there are multiple DevForum topics on this and YouTube videos (including one I made)