how to convert a string to number in Lua code example Example: lua string to number local str = '10.7' local num = tonumber(str)