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: Accessing a Module's variables.

Previous Thread :: Next Thread 
chimmmihc is not online. chimmmihc
Joined: 24 Jul 2014
Total Posts: 2420
22 Aug 2015 03:21 PM
I need to access one of the variables in the Invisicam module. How can I do this?
Report Abuse
digpoe is not online. digpoe
Joined: 02 Nov 2008
Total Posts: 9092
22 Aug 2015 03:21 PM
modify the module so you can access it
Report Abuse
Casualist is not online. Casualist
Joined: 26 Jun 2014
Total Posts: 4443
22 Aug 2015 03:21 PM
link to module?
Report Abuse
chimmmihc is not online. chimmmihc
Joined: 24 Jul 2014
Total Posts: 2420
22 Aug 2015 03:25 PM
http://www.roblox.com/Invisicam-item?id=183837794

Line 247, I need that variable so I can add it each part stored in it to mousefilter.
Report Abuse
chimmmihc is not online. chimmmihc
Joined: 24 Jul 2014
Total Posts: 2420
22 Aug 2015 04:10 PM
bumpasuarus rex
Report Abuse
epicbreaker is not online. epicbreaker
Joined: 23 Apr 2011
Total Posts: 2791
22 Aug 2015 04:13 PM
module = {}
module.Get = function(k)
return getfenv()[k]
end
return module

------------
x = require(your module)
x.Get("Name")
Report Abuse
chimmmihc is not online. chimmmihc
Joined: 24 Jul 2014
Total Posts: 2420
22 Aug 2015 04:24 PM
@Epic How does that work?
Report Abuse
morashsPeasant is not online. morashsPeasant
Joined: 06 Jan 2011
Total Posts: 4944
22 Aug 2015 04:29 PM
it gets the function environment and returns it and variables are just chilling there

while true do the do
Report Abuse
epicbreaker is not online. epicbreaker
Joined: 23 Apr 2011
Total Posts: 2791
22 Aug 2015 04:30 PM
getfenv() returns a table of all global variables.
"k" is the argument supplied from the requiring script.
Report Abuse
chimmmihc is not online. chimmmihc
Joined: 24 Jul 2014
Total Posts: 2420
22 Aug 2015 04:30 PM
getfunv being the function? And k being the variable?
Report Abuse
chimmmihc is not online. chimmmihc
Joined: 24 Jul 2014
Total Posts: 2420
22 Aug 2015 04:33 PM
I read the dump on the function I understand it now Ty.
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