lua math.tointeger code example Example: tointeger lua local a = "5" local numbera = tonumber(a) --is now an integer