Also go to an online Lua compiler
Code:
local value = "10,000"
print(tonumber(value))
That will return nil
Code:
local value = "10,000"
value = string.gsub(value, ",", "")
print(tonumber(value))
That will return 10000
Code:
local value = "10,000"
value = value:gsub(",", "")
print(tonumber(value))
Even that if you want
Also you probably want to use Regex because that will only work for English with a comma. It won't work for any foreign number with a period for the separator.
Code:
local value = "10.000"
value = value:gsub("[%p%c%s]", "")
print(tonumber(value))