|
| 02 Jun 2015 06:05 PM |
local Moderators = { ["Player"] = true, }
return Moderators
and then to require this table:
Reason: I'm trying to modularize (is that a word?) my DragonChat. |
|
|
| Report Abuse |
|
|
|
| 02 Jun 2015 06:06 PM |
Oops sorry im trying to require it like this
local Moderators = require(script.Parent:WaitForChild("AdminsModule")).Moderators |
|
|
| Report Abuse |
|
|
|
| 02 Jun 2015 06:08 PM |
Module: local Moderators = { ["Player"] = true, }
Some other script: meow=require(workspace.module) print(meow.Player) --true
dats hao u do eet kthx |
|
|
| Report Abuse |
|
|
|
| 02 Jun 2015 06:08 PM |
| Whoops the module shuold have the "return Moderators" of course |
|
|
| Report Abuse |
|
|
|
| 02 Jun 2015 06:10 PM |
I don't see why theres a problem with that. You could try using it in your code like so
local Moderators = {["Player"] = true} play.Chatted:connect(function(msg, rec) if(Moderators[play.Name] == true) then --dostuff end end) |
|
|
| Report Abuse |
|
|
|
| 02 Jun 2015 06:11 PM |
No no no no
I need to assign a var named Moderators to a table in there called Moderators also |
|
|
| Report Abuse |
|
|
|
| 02 Jun 2015 06:14 PM |
| Umm... Isn't it kinda redundant to have a "Moderators" table inside of a "Moderators" table? |
|
|
| Report Abuse |
|
|
|
| 02 Jun 2015 06:14 PM |
| Well i dont know how to do this |
|
|
| Report Abuse |
|
|
|
| 02 Jun 2015 06:23 PM |
Since it return the Moderators table anyways, all you need to do is this
local Moderators = require(script.Parent:WaitForChild("AdminsModule"))
R$314,459 |
|
|
| Report Abuse |
|
|
|
| 02 Jun 2015 06:24 PM |
Thanks Quint
Also, I love your game.
You made my day by replying :)
Also, question: Does EM2 run on FE? It would be cool if it did. |
|
|
| Report Abuse |
|
|
|
| 02 Jun 2015 06:25 PM |
| Also, if you want, check it out. You might like it ;) |
|
|
| Report Abuse |
|
|
|
| 02 Jun 2015 06:26 PM |
| Currently is broken with FE though. Still workin' on that..... |
|
|
| Report Abuse |
|
|
|
| 02 Jun 2015 06:34 PM |
Yeah, EM2 uses FilteringEnabled
R$315,987 |
|
|
| Report Abuse |
|
|
|
| 02 Jun 2015 06:35 PM |
Cool
Mind telling me how a remote function works? i know remote events but functions confuse me |
|
|
| Report Abuse |
|
|
|
| 02 Jun 2015 06:41 PM |
Same way remote events work except it yields the thread until the remote function finishes and it can return a value.
Firing RemoteEvents does not yield and does not return a value.
I think this post explains it well: http://wiki.roblox.com/index.php?title=RemoteFunction_and_RemoteEvent_Tutorial
R$316,917 |
|
|
| Report Abuse |
|
|