How can i call function into any table?

My question is: Is that possible to call functions into any table? Like:

function test(self)
	table.remove(self)
end

local myTable = {
	table2 = {
		"hello!",
		false
	},
	table3 = {}
}

--What i want to do:

myTable.table2:test() 

I know i can do this function with other ways too, but i will do something different.

2 Likes

Question about functions in tables - Help and Feedback / Scripting Support - DevForum | Roblox

I know that, but i try to call function into all tables.

What you could do is something similar to this

local myTable = {
			table2 = function()
				-- stuff 
			end;

	table3 = {}
}

--What I want to do:

myTable.table2() 

I know i can do this, but if i want to add this function into all table variables, that’s take long.