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

How to use the require script?

Asked by
j5707r -36
7 years ago

So, the require script is a script that inserts a model into you're game. This is what I am doing now.

require(1081187923)

Am I doing something wrong? It isn't inserting the model, do I have to add something, delete, edit anything?

2 answers

Log in to vote
1
Answered by 7 years ago
Edited 7 years ago

The reason is that you are not doing anything with the require. For example, a module could be this

local module = {}
function module:MakeModel()
    return Instance.new('Part')
end
return module

and you'd have to do in a server script

require(1234567--[[module name here]]):MakeModel()

Remember, requiring an asset cannot be used in studio, nor a local script.

Hope this helps!

0
How do I make that a full script, and put both lines together? j5707r -36 — 7y
0
Wdym? hiimgoodpack 2009 — 7y
0
So the lines of code you just made, how do I put them together in one script? j5707r -36 — 7y
0
You mean like, recursion? These arent supposed to go in one script. hiimgoodpack 2009 — 7y
View all comments (41 more)
0
Oh, okay j5707r -36 — 7y
0
It's not working j5707r -36 — 7y
0
Did you apply the edits? hiimgoodpack 2009 — 7y
0
Can you make a model of it, then send me the link? Friend request me: j5707r j5707r -36 — 7y
0
but roblox is mean and they dont allow you to delete models and it will be stuck in my inventory forever D: hiimgoodpack 2009 — 7y
0
Please? j5707r -36 — 7y
0
1) How fast are you at refreshing your page 2) How hard is this? hiimgoodpack 2009 — 7y
0
Hard, and, I am fast at refreshing the page j5707r -36 — 7y
0
so like 8 left clicks and 2 right clicks and pressing 6 keys is hard? hiimgoodpack 2009 — 7y
0
ummmmmmmmm? j5707r -36 — 7y
0
?? hiimgoodpack 2009 — 7y
0
I mean, I know how to refresh the page and post.........But I'm talking about the require script.. j5707r -36 — 7y
0
Yeah it takes 8 left clicks, 2 right clicks, and 6 keys to get the scripts ready. hiimgoodpack 2009 — 7y
0
Please? Can I just have the model? j5707r -36 — 7y
0
____________________________________________explodes hiimgoodpack 2009 — 7y
0
plz? j5707r -36 — 7y
0
You there? Please, accept my friend request and send me the model (: j5707r -36 — 7y
0
i am here and i dont want to make another thing i cant delete hiimgoodpack 2009 — 7y
0
...I need this badly, before people get mad at me for not making it. j5707r -36 — 7y
0
Why would other people get mad at you? hiimgoodpack 2009 — 7y
0
I promised I would give them this today j5707r -36 — 7y
0
Who is "them"? Why don't you just not use a module if you dont know how they work? hiimgoodpack 2009 — 7y
0
Please? Can't you spare 1 more model in you're inventory? I am really busy and don't have time right now j5707r -36 — 7y
0
You there? j5707r -36 — 7y
0
Why not just use a regular script if you don't know how modules work? hiimgoodpack 2009 — 7y
0
IDK HOW TO DO THIS, I PUT IT IN A REGULAR SCRIPT AND IT DIDN'T WORK, IDK WHAT TO DO. Srry caps. j5707r -36 — 7y
0
DONT STYLE IT AS A MODULE, JUST INSERT A MODEL USING A REGULAR SCRIPT HOW HARD IS THIS hiimgoodpack 2009 — 7y
0
i'm new to scripting! I tried the script. It didn't work, I put in the code1 j5707r -36 — 7y
0
DONT STYLE IT AS A MODULE SCRIPT IF YOU SCRIPTED IT WHY CAN'T YOU CONVERT IT TO A REGULAR SCRIPT hiimgoodpack 2009 — 7y
0
You don't understand! I didn't use a module script! I USED A REGULAR SCRIPT j5707r -36 — 7y
0
THEN WHY ARE YOU USING REQUIRE???? hiimgoodpack 2009 — 7y
0
I NEED TO! JUST PLEASE MAKE A MODEL OF IT j5707r -36 — 7y
0
HOW DO YOU NEED TO?? ITS A REGULAR SCRIPT ORIGINALLY!! hiimgoodpack 2009 — 7y
0
why is it so hard to make a model???????? j5707r -36 — 7y
0
U there? j5707r -36 — 7y
0
Okay, what do I do with that stuff j5707r -36 — 7y
0
Are you there? What am I supposed to do with that stuff. I am new to scripting, Idk about it. Post a new answer below with the full script and what I have to do in it. j5707r -36 — 7y
0
You have eyes, you can read the page. hiimgoodpack 2009 — 7y
0
I'm not a scripter! I don't know anything about it! j5707r -36 — 7y
0
You there? I don't understand what it says, please, explain it clearly j5707r -36 — 7y
Ad
Log in to vote
-1
Answered by 7 years ago

Require isn't it ment to be used in a module script not in a normal script? Its not really an answer but just try it.

0
I'll try, thank you! j5707r -36 — 7y
0
No, require is meant to be used outside of a module to call a module. You can still use it in a module to use recursion, however. hiimgoodpack 2009 — 7y

Answer this question