local Window = {}
Window.__index = Window
function Window.New(Type)
local NewWindow = {}
NewWindow.Base = _G.UI.Window:Clone()
NewWindow.Base.Name = Type.."Window"
NewWindow.WindowFrame = NewWindow.Base.WindowFrame
NewWindow.Move = false
if Type == "Editor" then
NewWindow.Inside = _G.UI.Editor:Clone()
end
NewWindow.Inside.Parent = NewWindow.WindowFrame.Background
setmetatable(NewWindow, Window)
return NewWindow
end
function Window:Setup()
local A : Frame
--// Move //--
self.WindowFrame:FindFirstChild("Move", true).MouseButton1Down:Connect(Window.Move(self))
--// //--
end
function Window:Move()
warn("Move:", self)
end
return Window
Prints/Warns out:
I clearly got what I want — it printed out Move; but why is there an error saying “Passed value is not a function”? I just got started on learning Object Oriented Programming so please do keep that in mind.