I have a button class here and when I’m trying to call the :Destroy() method, the output is telling me that the Maid is nil. Solutions?
local Button = {}
Button.__index = Button
function Button.new(button: Model)
local newButton = {}
setmetatable(newButton, Button)
newButton.maid = Maid.new()
newButton.clickConn = newButton.maid:GiveTask(button.Main.Touched:Connect(function(player)
print("bugha")
end))
newButton.bugha = "hello"
return newButton
end
function Button:Destroy()
self.maid:DoCleaning()
print("Button destroyed")
end