How would I go about checking if a function is a method or a function in a table?

So here is what I’m trying to do:

local t = {}
t.Example = "Hello"

function t:Method()
    --Can access the `t` table using self
    print(self.Example)
end

function t.Function(tbl)
    --`t` has to be passed in 
    print(tbl.Example)
end

How would I find the difference between the method and function?

2 Likes