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

Does require() only work if the Module is in your inventory? [Unsolved]

Asked by 8 years ago

I was wondering if anyone can tell me if the require(assetid) function only work's if they have the MainModule part in their inventory, cause I give my friend's a require(assetid) and it won't load for them but it load's for me.

1 answer

Log in to vote
0
Answered by 8 years ago

require(assetid) will work for any item on Roblox, although:

  • The item must be a modulescript
  • The item must be named "MainModule"
  • The script require'ing the module MUST be serverside, and it has to be a script (not localscript)

require(In-game module) will work on any modulescript, regardless of name, location or script-type.

In studio, require'ing the assetId will only work if it's in your inventory. To properly test it, it must be run on the server.

0
My friend uploads it to a place and we go to it, and the ModuleScript doesn't load but it load's for me. ISellCows 2 — 8y
0
Hm, I know it definitely works, because Epix Incorporated Server Suite (the admin) uses it to auto-update. Maybe he's broken the require script? darkelementallord 686 — 8y
Ad

Answer this question