Metatable "new" isn't adding to self?

local class = {}
class.__index = class

function class.new(root)
	
	local new = setmetatable({}, class)
	new.root = root
	
	new.ActiveMenu = nil
	
	
	return new
	
end


return class

it was working but now it doesnt add anything i add under the metatable named “new” to the class, sorry if i am being vague i am not really good at explaining

1 Like

nevermind, it turns out when doing print(self) it doesn’t show things added by metatables, but it will actually be there. i made a typo

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.