Method Inside A Method?

How Could I Implement A Function Inside A Function Using A Module Kinda?

  • Example
local Module = require("Module")
Module.Create("Foo"):Init() 

I’ve Already Attempted Trying To Implement This Just To Fail, So Does Anyone Know
How I Can Possibily Implement This?

1 Like

Try this:
module.GiveMeFunctions().Function1(“Hi”)

local module = {}

function module.GiveMeFunctions()
	return {
		["Function1"] = function(String)
			print(String)
		end
	}
end

return module
1 Like

I suggest getting into Object Orientated Programming, as it’s one of the ways you could achieve this :slightly_smiling_face:

2 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.