Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How to properly use ModuleScripts?

Asked by 8 years ago

I am new to scripting in ModuleScripts and everytime I try using require(assetid) it give's me this error: Requested module experienced an error while loading. Can anyone tell me how to fix this? Here is the code.

require(281646556)

local module = {}

return module

0
When you use require on an roblox asset id, is that asset id with a script that is named MainModule? If not, it won't work. Nickoakz 231 — 8y
0
Yes, the ModuleScript is named MainModule. ISellCows 2 — 8y
0
Is the code you posted the code for the Module itself? The require call is erroring, because the MainModule at 281646556 is erroring. adark 5487 — 8y
0
What is the content of that module..? Why is this module script doing nothing but requiring another? BlueTaslem 18071 — 8y
0
This question has been asked many many time sbefore unmiss 337 — 8y

Answer this question