Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How to use the require script?

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

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!

45 comments

0

How do I make that a full script, and put both lines together?

0

Wdym?

0

So the lines of code you just made, how do I put them together in one script?

0

You mean like, recursion? These arent supposed to go in one script.

0

Oh, okay

0

It's not working

0

Did you apply the edits?

0

Can you make a model of it, then send me the link? Friend request me: j5707r

0

but roblox is mean and they dont allow you to delete models and it will be stuck in my inventory forever D:

0

Please?

0
  1. How fast are you at refreshing your page 2) How hard is this?
0

Hard, and, I am fast at refreshing the page

0

so like 8 left clicks and 2 right clicks and pressing 6 keys is hard?

0

ummmmmmmmm?

0

??

0

I mean, I know how to refresh the page and post.........But I'm talking about the require script..

0

Yeah it takes 8 left clicks, 2 right clicks, and 6 keys to get the scripts ready.

0

Please? Can I just have the model?

0

____________________________________________explodes

0

plz?

0

You there? Please, accept my friend request and send me the model (:

0

i am here and i dont want to make another thing i cant delete

0

...I need this badly, before people get mad at me for not making it.

0

Why would other people get mad at you?

0

I promised I would give them this today

0

Who is "them"? Why don't you just not use a module if you dont know how they work?

0

Please? Can't you spare 1 more model in you're inventory? I am really busy and don't have time right now

0

You there?

0

Why not just use a regular script if you don't know how modules work?

0

IDK HOW TO DO THIS, I PUT IT IN A REGULAR SCRIPT AND IT DIDN'T WORK, IDK WHAT TO DO. Srry caps.

0

DONT STYLE IT AS A MODULE, JUST INSERT A MODEL USING A REGULAR SCRIPT HOW HARD IS THIS

0

i'm new to scripting! I tried the script. It didn't work, I put in the code1

0

DONT STYLE IT AS A MODULE SCRIPT IF YOU SCRIPTED IT WHY CAN'T YOU CONVERT IT TO A REGULAR SCRIPT

0

You don't understand! I didn't use a module script! I USED A REGULAR SCRIPT

0

THEN WHY ARE YOU USING REQUIRE????

0

I NEED TO! JUST PLEASE MAKE A MODEL OF IT

0

HOW DO YOU NEED TO?? ITS A REGULAR SCRIPT ORIGINALLY!!

0

why is it so hard to make a model????????

0

U there?

0

Okay, what do I do with that stuff

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.

0

You have eyes, you can read the page.

0

I'm not a scripter! I don't know anything about it!

0

You there? I don't understand what it says, please, explain it clearly

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.

2 comments

0

I'll try, thank you!

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.

This discussion is preserved as it was. New answers, comments, and votes are closed.