Something like this is more convenient, faster, and cleaner
local vars = {}
local max_vars = 61 -- Maximum variable, minimum is 1, maximum is infinite
-- This is done when the script is created, it does the same thing as the example
-- Except that instead of vars.var1, it is vars[1]
for i = 1, max_vars do
vars[i] = 0
end
local function Update(event)
for i = 1, #vars do
print(vars)
end
end
return vars
Declaring these thing 1 by one is a waste of time
But yeah, 60 upvalues is completely crazy