Hello everyone,
I have a question on the best practice for using constructors. I have been doing it a different way like this:
function Group.new(Target, Number)
-- Initialize() basically sets everything up (references, new Instances, etc.)
return setmetatable({}, Group):Initialize(Target, Number)
end
instead of:
function Group.new(Target, Number)
local NewGroup = setmetatable({}, Group)
-- where everything is set up (can get long however)
NewGroup.this = "that"
NewGroup.NeededInstance = Instance.new("Accessory")
-- blah, blah blah
return NewGroup
end
Are you supposed to put all of the set-up stuff in the constructors or is it ok to split it up into a different method?