So I’m making an inventory system for my game.
I decided it would be helpful if I made it OOP structured. And it actually is, but I dont know how to access inputs from my module script.
local Inventory = {}
Inventory.__index = Inventory
function Inventory.New(Player)
local self = setmetatable({}, Inventory)
self.Slots = {}
self.MaximumSlots = 4
return self
end
function Inventory:Open()
--open inventory
end
return Inventory
Now there’s more in this script, but nothing is connected with inputs or anything like that.
So how would I be able to detect inputs on this module script AND be able to use the self keyword when calling my fucntion. (self:Open())