ModuleScripts & RemoteEvents - CheckMeIn API

Hi! I recently noticed a new CheckMeIn update which allowed for forcing checking in players to a room type. I massively need this for my group, however I noticed that when I attempted to use a RemoteEvent to fire the ModuleScript function, it would error saying that RemoteEvents can’t be used in ModuleScripts.

Currently, my goal is to have a UI which would be able to send a request to this module with parameters including the player typed in, and the roomtype.

Currently, I have attempted to have the UI send a remote to a script, which would then set values in the modulescript, then enable the modulescript. I now notice, you can’t enable/disable a ModuleScript. Would anyone happen to have any input on how I could do this?

I’ve only received 1 lead on what to do, however I didn’t quite understand it.

You just have to wrap the remotes in an initialization function and run that before they start listening

I wasn’t quite sure what they meant here, as I usually don’t work with functions and/or modulescripts. If anybody could help, that would be greatly appreciated!

You could catch the event in a LocalScript or Script, which then forwards the arguments to a ModuleScript via a function.

A module script will only run when it is required, ex:

require(workspace.ModuleScript)

I imagine this is what you are referencing when you say “enabling/disabling” a ModuleScript. I also feel a redundancy in enabling/disabling ModuleScript that most likely has functions inside of it that can be called remotely but I digress.