I’m slowly trying to learn OOP (object oriented programming) right now, it’s going okay but I have a question,
Lets say you have this module script
local Person = {}
Person.__index = Person
function Person.new(Name)
local self = {}
self.Name = Name
return setmetatable(self, Person)
end
function Person:PrintName()
print(self.Name)
end
and say you have this server script
local PersonModule = require(script.PersonModule)
local Bob = PersonModule.new("Bob")
Would it be possible from another server script or module script to do Bob:PrintName()
Because I’m working on this project, and im trying to implement OOP but I need to do Bob:PrintName()
from another script, how would I go about doing this/or is this possible?
Thanks in advance,