I’m trying to figure out how I can check when an OOP object’s property is changed in a script. Is this possible?
(Context)
local class = {}
class.__index = class
function class.new()
local self = setmetatable({}, class)
self.Enabled = false --How would I check if this was changed?
return self
end
retun class
I think you could use the __index metamethod and set it to a table containing Enabled = Instance.new("BoolValue")
Then access the __index table directly and use t.Enabled.Changed, assuming t is the table