Okay just to make sure I’m doing this right. I could turn this:
function stats:Create(stat, numerical)
if numerical then
self[stat] = 0
print("Created numerical value: ".. stat)
else
local newtable = {}
setmetatable(newtable, stats)
print("Created value: ".. stat)
self[stat] = newtable
end
end
Into this, correct?
function stats:Create(stat, numerical)
if numerical then
self[stat] = 0
print("Created numerical value: ".. stat)
else
print("Created value: ".. stat)
self[stat] = setmetatable({}, stats)
end
end