Requiring Module By ID

So I know that I can require a module by the asset id, but what are the limitations of this?

Could I possible use it so I can share by code with others without them actually being able to read the code?

What are the downsides?

If the module is open to public, you should be allowed to require it with require()

1 Like

my module is not open to the public, but it is owned by me

is that why I can still use it?

The only difference when require()ing by AssetId, is that you request the code straight from the resource, meaning you can not modify it in any way shape or form.

Unfortunately, the only way you can require a module through AssetId, is if the module is publicly available. Therefore you can not limit other from obtaining obtaining the Model. In other words, if it is open for calling through AssetId, the Model is also available.

Even if this was an option, it wouldn’t stop people from just looking through the roblox studio caches and finding it. Once it is required, it is on your machine in studio, and is discoverable through certain means.


Yes, it is. Others can not require it until you enable copying.