Requiring an assetID will always print a warning

Currently if you require() an assetID for a ModuleScript, a warning will be printed the first time you require it.

Calling require(assetId) on a module that has an incorrect asset type will not work in the future.Please update your game so it does not rely on modules that have been uploaded incorrectly.The module in question has the asset id 4820151578.

“incorrect asset type” - AFAIK there is currently no other way to upload a ModuleScript.

You can reproduce this with this module if you’re so inclined by taking the model and running require(4820151578) in the command bar.

image

About 2.5 hours ago a flag called ForceTypeCheckOnRequire was enabled, which is presumably the cause of this.

Maybe this was enabled prematurely, or maybe somebody just wanted to see if their flag broke everything. Bringing attention to this just in case since we had someone concerned in Post Approval.

5 Likes

I have realised that Plugins are no longer supporting Modules, so to call one with a require you would have to upload it as a model, there’s barely any difference though because you can always take the module offsale, considering it’s your model, you can insert it wherever and nobody else, another great tip is that calling a module ingame once will save the module to the server, so you can put it offsale and continue to use the module in the session if it has been run before.

The warning was being displayed in error. It should be fixed now.

14 Likes

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