Module script function returning nil

I am trying to return a Function within a Function in a module script, but its returning nil.

Here are the script structures

–Module Script–

local module = {}

function module.Function()
        --Script Stuff

		local function innerFunction()
			--More script stuff
		end
		
		return innerFunction
	end
end

return module

–Calling Script (Server)–

local mod = require(game.ReplicatedStorage.Modules.Module)

local func = mod.Function()

func()

But when called in the actual script it throws error

Script:5: attempt to call a nil value

Then when printed it is nil?

Im stumped on this :confused:

Maybe try to change the name of the module.Function()>?

All the variable names and function names in the actual scripts are different, this is just to show the structure of the scripts.

I solved it, just did it the complicated way.