generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: require() in a GUI script

Previous Thread :: Next Thread 
Naco88 is not online. Naco88
Joined: 30 Oct 2009
Total Posts: 665
26 Sep 2016 03:55 PM
For the past 3 hours I have been working on a script inside a GUI. The main purpose of the script is that it requires [require(thing)] a module script which returns a value.

It worked fine in studio but in the ROBLOX client it just doesn't require the script.

Please help me salvage my work...
Report Abuse
LockFocus is not online. LockFocus
Joined: 31 Aug 2013
Total Posts: 1044
26 Sep 2016 03:56 PM
I believe require() works on client..
No clue tbh.
Report Abuse
Kodran is not online. Kodran
Joined: 15 Aug 2013
Total Posts: 5330
26 Sep 2016 03:56 PM
require(id) doesn't work from the client.


Report Abuse
Naco88 is not online. Naco88
Joined: 30 Oct 2009
Total Posts: 665
26 Sep 2016 04:00 PM
I'm doing require(game.Workspace.ModuleScript) in a script in a GUI.

Why wouldn't that work?

And why would ROBLOX have a feature that doesn't work in the client?
Report Abuse
llaserx is not online. llaserx
Joined: 10 Dec 2011
Total Posts: 53069
26 Sep 2016 04:48 PM
U must not understand what ur doing if that doesnt work
Report Abuse
VilgO is not online. VilgO
Joined: 15 Feb 2011
Total Posts: 518
26 Sep 2016 05:04 PM
Post some code, duh. Tell us what your ModuleScript does and how you're trying to use it.
Report Abuse
Naco88 is not online. Naco88
Joined: 30 Oct 2009
Total Posts: 665
27 Sep 2016 10:30 AM
I'll post some code later today. I just don't think it would help much it's so long.

Also I do understand what I'm doing because if you read the original post, this works fine in studio just not in the client.
Report Abuse
xXLuka_XD is not online. xXLuka_XD
Joined: 27 Mar 2016
Total Posts: 296
27 Sep 2016 10:43 AM
i think so require() was deleted . Try by identify and if statement
Report Abuse
LockFocus is not online. LockFocus
Joined: 31 Aug 2013
Total Posts: 1044
27 Sep 2016 11:20 AM
@xx
what
Report Abuse
Mister_Manakin is not online. Mister_Manakin
Joined: 16 Sep 2009
Total Posts: 1935
27 Sep 2016 11:23 AM
Are you using a server script for this?
Report Abuse
VilgO is not online. VilgO
Joined: 15 Feb 2011
Total Posts: 518
27 Sep 2016 11:38 AM
If it works in Studio but doesn't work when you test it with multiple players, it may have something to do with the fact that ModuleScripts are not shared between client and servers, they're interpreted once for each machine.
Report Abuse
Mister_Manakin is not online. Mister_Manakin
Joined: 16 Sep 2009
Total Posts: 1935
17 Nov 2016 07:04 PM
From my own experience module scripts can be called from a client if they are a child of the workspace. Using an id or calling a module script in ServerScriptService won't work on the client.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image