Cannot import ModuleScript

Hey, I’m trying to import a ModuleScript, but it won’t import.

I’m getting this error
Unable to find module for asset id 5613153522. Does the asset have a ModuleScript named "MainModule"?
I’m not sure what to do. Anyone know how to fix it?

Now It’s not saying anything, and if i try to print It’s name after the require(), it prints nil

Make sure the Module’s name is “MainModule”

image

If it’s named MainModule then I’m not sure why it’s not working. You could try updating the asset or re-uploading it too see if that works.

Did you name the module to “MainModule” on the Roblox website?

Also did you type game:GetService("InsertService"):LoadAsset(ModuleID).Parent = workspace?

  • I don’t think you can import by ID on the client, presuming you’re attempting to require this on the client.
  • I think modules have to be on sale in order to require by ID. Don’t know if this applies to your own modules though.
1 Like

Oh, thats probably the problem. I just did require(ID)

You use require() only for when you are going to be using the functions from the module script into the script but if you want to load it in studio then use the code I posted earlier and type it into the command bar.