Question about module scripts for anti-cheat

My question is that me asking if it is possible for me to put a function within another module function, and it won’t run unless I directly activate it?

e.g

function AC.Checks(Player, Character, Humrp)

function AC.CheckLength()
      end
end

(This isn’t an actual script, this is kind of the vision for my client-side combat, that I am currently in the middle of creating

I don’t quite understand what you’re talking about. You want to have a function inside a function? You can simply do this:

function AC.Checks(Player, Character, Humrp)
	local function CheckLength()
		
	end
	
	CheckLength()
end

Basically, you’re creating a function localized to AC.Checks() therefore it cannot be called outside of that function.

Yeah, but the issue is that I don’t want it to run unless it is directly called. Would that serve that purpose?

It would yes, because the “local function” part being inside the parent function will prevent it from being called outside the parent function.

Alright, that’s really all I wanted to know. Thank you.

Are you requiring it in client? Just curious.