So I have a list of numbers and I was wondering if there was a way to add all the numbers in the list together.
local listOfNumbers = {1,2,3,4,5} local sum = 0 for i, v in pairs(listOfNumbers) do --loop over the list of numbers sum = sum + v --add each number to the sum end print(sum)