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

Using require(), I keep getting an error?

Asked by 5 years ago
Edited 5 years ago

How exactly do I use require?

The script in ServerScriptService has this code in it:

local module = require(2293721179)
module.Parent = game.ReplicatedStorage


while true do
        wait(.6)
    module.heck()
end

and my module has this in it:

local module = {}


module.heck = function()
    for i,v in pairs(game:GetDescendants()) do
        print(v)
    end
end

return module

I thought this would work but it keeps giving the error:

unable to find module asset id even though the asset id is correct?? How do I fix this...

Thanks in advance for any help.

0
local module = require("2293721179")? mixgingengerina10 223 — 5y
0
no User#19524 175 — 5y

1 answer

Log in to vote
0
Answered by
Mokiros 135
5 years ago

Looks like you're trying to use private module inside studio that you don't own. Private modules are ModuleScripts that you can only load on a server, and not in studio, unless you own them.

https://www.robloxdev.com/articles/Using-Private-Modules

Ad

Answer this question