hookmetamethod
hookmetamethod(object: any, method: string, hook: function): function
Hooks one metamethod and returns the original.
Example
local old
old = hookmetamethod(game, "__index", function(self, key)
return old(self, key)
end)Hooks one metamethod and returns the original.
local old
old = hookmetamethod(game, "__index", function(self, key)
return old(self, key)
end)