I know this can be done because I have seen it done in Epix Incorporated Server Suite, where it requires the main module and sets its parent to one of the folders, I looked at the script and was confused as to how this could be done. Here is what I have so far:
local worked,why=ypcall(function() require(461660539)(script) end) if not worked then warn("There was an error when requiring the admin module.") warn("Error: "..why) end
But that only requires it, I am wondering how to place it to a location in the game?
The Module you are using returns function
, being that why the parametters are script
.
To place it in a location on your game you must make the ModuleScript
clone/parent itself somewhere else on your game.
To do this, you could instead insert the ModuleScript
with InsertService
into your game, parent it and require it, or, on your function you could make it clone itself and parent.