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

Would this be possible? [Lua Require]

Asked by 7 years ago

So I'm scripting this thing in roblox which needs a few scripts to run so to make it easier and make it so people cant find the script in my game is it possible to do a require like this?

local Script1 = require("rbxassetid://IDHere");

If it cant be done please reply if its wrong and i'm doing it wrong, please reply with what I did wrong.

1
'require(IDHere)' works, make sure it is not a string. TheDeadlyPanther 2460 — 7y
0
Oh thanks! MariusCorpelius 0 — 7y
0
@TheDeadlyPanther should I be concerned if it says "Unable to find module for asset id" MariusCorpelius 0 — 7y
0
Yes, what exactly did you upload it with? The ModuleScript needs to be named MainModule, and uploaded as a model. TheDeadlyPanther 2460 — 7y
View all comments (4 more)
0
@TheDeadlyPanther I uploaded it with the Roblox Selection and I named it something else than the "Script1"? MariusCorpelius 0 — 7y
0
@TheDeadlyPanther when I test it in game it says this "require(assetid) cannot be called from a client" MariusCorpelius 0 — 7y
0
Game players cant see any script. Have you played any roblox game? SH_Helper 61 — 7y

1 answer

Log in to vote
0
Answered by 7 years ago

You can use Require for scripts. Instead of putting local Script1 = require("rbxassetid://IDHere"), you would put require(IDHere). The module script that you upload as the asset will need to be named 'MainModule'.

If this helped, please accept it.

-Best regards

Ad

Answer this question