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
|
  |
| 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
|
  |
| Joined: 15 Aug 2013 |
| Total Posts: 5330 |
|
|
| 26 Sep 2016 03:56 PM |
require(id) doesn't work from the client.
|
|
|
| Report Abuse |
|
|
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
|
  |
| 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
|
  |
| 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
|
  |
| 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
|
  |
| 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
|
  |
| Joined: 31 Aug 2013 |
| Total Posts: 1044 |
|
| |
|
|
| 27 Sep 2016 11:23 AM |
| Are you using a server script for this? |
|
|
| Report Abuse |
|
|
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 |
|
|
|
| 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 |
|
|