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: How come this SIMPLE module doesnt work..?

Previous Thread :: Next Thread 
iSpecializinq is not online. iSpecializinq
Joined: 31 May 2015
Total Posts: 2182
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
iSpecializinq is not online. iSpecializinq
Joined: 31 May 2015
Total Posts: 2182
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
infortality is online. infortality
Joined: 28 May 2012
Total Posts: 942
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
infortality is online. infortality
Joined: 28 May 2012
Total Posts: 942
02 Jun 2015 06:08 PM
Whoops the module shuold have the "return Moderators" of course
Report Abuse
deathknight306 is not online. deathknight306
Joined: 15 Jan 2008
Total Posts: 183
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
iSpecializinq is not online. iSpecializinq
Joined: 31 May 2015
Total Posts: 2182
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
infortality is online. infortality
Joined: 28 May 2012
Total Posts: 942
02 Jun 2015 06:14 PM
Umm... Isn't it kinda redundant to have a "Moderators" table inside of a "Moderators" table?
Report Abuse
iSpecializinq is not online. iSpecializinq
Joined: 31 May 2015
Total Posts: 2182
02 Jun 2015 06:14 PM
Well i dont know how to do this
Report Abuse
QuintinityZero is not online. QuintinityZero
Joined: 01 Oct 2008
Total Posts: 10618
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
iSpecializinq is not online. iSpecializinq
Joined: 31 May 2015
Total Posts: 2182
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
iSpecializinq is not online. iSpecializinq
Joined: 31 May 2015
Total Posts: 2182
02 Jun 2015 06:25 PM
Also, if you want, check it out. You might like it ;)
Report Abuse
iSpecializinq is not online. iSpecializinq
Joined: 31 May 2015
Total Posts: 2182
02 Jun 2015 06:26 PM
Currently is broken with FE though. Still workin' on that.....
Report Abuse
QuintinityZero is not online. QuintinityZero
Joined: 01 Oct 2008
Total Posts: 10618
02 Jun 2015 06:34 PM
Yeah, EM2 uses FilteringEnabled


R$315,987
Report Abuse
iSpecializinq is not online. iSpecializinq
Joined: 31 May 2015
Total Posts: 2182
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
QuintinityZero is not online. QuintinityZero
Joined: 01 Oct 2008
Total Posts: 10618
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
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