So now you're just insulting, and makes your reply useless. I've not invented things.
lifetime of storage is independant of lifetime of values. That's the full point and the final answer. And yes it applies to C, C++, Java, and Lua and it has always been the case in all imperative languages
This is not true of *pure* functional languages (including Mathematics formulas, in which there are no assignment, only definitions of symbolic constants in a well defined scope: even the "variables" introduced in quantified formulas, with "for all" or "there exists", or in aggregators like "sum of", have a constant value in their delimited scope, and no "lifetime" at all; functions in mathematics are a way to specify a constant relation as a constant set of ordered tuples, possibly and frequently with infinite cardinality), some of them being given the role of "input variables", the other ones being the "ouput variables", but in fact those variables are also constants associated symbolically to constant subsets of the constant relation, and these functions or variables also don't have any defined "lifetime").
But Lua is clearly not a functional language simply because of its imperative nature (as an ordered set of statements that cannot be reversed), and the presence of assignments.
What you may want is using Lua as if it was a functional language, but it is another goal, and most probably you'd better use a functional language (which are still runnable because what they do is to implement in the engine an evaluator or resolver that transforms the functional definition of your program into an ordered set of statements to resolve the problem according to the constraint of a given goal, and in a finite time, and then compile internally the resolution to run it fast; given different input, it internally generates and compiles different imperative programs and you do not specify in the functional program source the resolution order).
For that you have various other languages (though most of them are not purely functional and allow exceptions, including Prolog or Scheme with a way to control the "backtracking" to give an "apriori" limit for exploration of candidate sets to resolve a problem only within a subset of constraints on selected variables, and then making the program fail without any useful result if these constraints are not respected or insufficient for the given input).