So i want to know if there is a metamethod that is able to detect when a line of code uses it in a local. Like this:

-- here should be the metatable and the method that prints hi when it is used in a local

local Bla = metatable -- the metatable is set as a local and the metamethod detects it

Anything that is similar would help too doesn't have the be a metamethod.