|
| 19 Jul 2015 09:11 AM |
like a local script?
Can't you see that everything I've done has been about trying to repay him? |
|
|
| Report Abuse |
|
|
Trioxide
|
  |
| Joined: 29 Mar 2011 |
| Total Posts: 32902 |
|
|
| 19 Jul 2015 09:16 AM |
| If you require the module from a localscript, then yes. |
|
|
| Report Abuse |
|
|
lolb3
|
  |
| Joined: 16 Jan 2010 |
| Total Posts: 2268 |
|
|
| 19 Jul 2015 09:18 AM |
| fun fact if you put a variable in the _G global table, it can be used by the required modulescript |
|
|
| Report Abuse |
|
|
|
| 19 Jul 2015 09:19 AM |
| It can be used by all scripts running on that Roblox instance. |
|
|
| Report Abuse |
|
|
|
| 19 Jul 2015 09:23 AM |
@Tri crap, so I can't do anything like this:
game.Players.PlayerAdded:connect(function(p) p.CharacterAdded:connect(function(c) c.Archivable = true wait() c.Parent = nil local TC = require(p:WaitForChild("PlayerGui").TankControl) TC.control(game:GetService("ServerStorage")["Challenger 2"]) end) end)
Can't you see that everything I've done has been about trying to repay him? |
|
|
| Report Abuse |
|
|
| |
|
|
| 19 Jul 2015 09:25 AM |
Keeping in mind a different _G and a different shared exists for each client, and for the server.
Also remember ModuleScripts basically "inherit" the type of script they are from the script that requires them, so if a LocalScript requires a ModuleScript, then they have their own copy of the ModuleScript, and that ModuleScript can access local things such as CurrentCamera, or their local _G, etc. |
|
|
| Report Abuse |
|
|
|
| 19 Jul 2015 09:25 AM |
"Is that a localscript?"
obviously not considering PlayerAdded event
Can't you see that everything I've done has been about trying to repay him? |
|
|
| Report Abuse |
|
|
lolb3
|
  |
| Joined: 16 Jan 2010 |
| Total Posts: 2268 |
|
|
| 19 Jul 2015 09:27 AM |
| fitz you can always A: put the script in the player when they join or B: put a local script in a local bin |
|
|
| Report Abuse |
|
|
|
| 19 Jul 2015 09:28 AM |
| I knew it wasn't a localscript, but it was already made clear that a required() module will run on the Roblox instance it is required from, so your question was redundant. |
|
|
| Report Abuse |
|
|
|
| 19 Jul 2015 09:34 AM |
""Is that a localscript?"
obviously not considering PlayerAdded event"
I think nQ was aiming more for a sarcastic question as if to say "duh, of course it won't work". |
|
|
| Report Abuse |
|
|