Is it possible to get (from InsertService) run a module script in developer console?

Hey guys, I’m working on an admin panel that is accesible by writing a line of code through your game’s developer console. The thing is, I don’t really know how to form that line of code. I want the line of code to get the module script from InsertService, but with my method it doesn’t work. I don’t even know if the module script should even run if I require it from the developer console. Anyways, heres the code that I tried using that didn’t work:

require(game:GetService("InsertService"):LoadAsset(ID))

That didn’t work : (
If you can help please do! Thanks!

1 Like

can’t you just assign it a variable

local whatever = game:GetService("InsertService"):LoadAsset()
require(whatever)

hope that somehow works lol
that probably won’t change anything but it’s worth a try

2 Likes

thanks, but I already tried that. I’m going to see if wrapping the code in the module script inside a function and then running that function will help.

1 Like

you should probably print it to even know if it’s nil or not. also what’s the error? also the module is parented to nil which could accidentally lead to a memory leak or something

1 Like

heres the error (images are just easier : P)

1 Like

is it nil though? try adding a wait or something lol

1 Like

that seemed to help. it seems to work now! ill add the code in a later edit hold on…

1 Like
task.wait() require(game:GetService("InsertService"):LoadAsset(ID).ModuleScriptName)

i knew it1111
ok but the require error happens when the argument is not a module, and i realized insert has to download assets, meaning it took a second or 2 for it to exist and stop being nil

1 Like

edit this into the top of your mesage
wait() require(game:GetService("InsertService"):LoadAsset(ID).ModuleScriptName)

1 Like

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