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 » Scripting Helpers
Home Search
 

Accessing a Variable from a Different Script

Previous Thread :: Next Thread 
testdummy5000 is not online. testdummy5000
Joined: 04 Jun 2010
Total Posts: 818
13 Aug 2014 07:34 AM
Could you change a variable that is in a different script from another script?

EXAMPLE:

Script 1

x = 1

----------

Script 2

wait(1)

x = 3


Would this work? Please respond. Thank you.
Report Abuse
testdummy5000 is not online. testdummy5000
Joined: 04 Jun 2010
Total Posts: 818
13 Aug 2014 07:40 AM
I jut realized that you're declaring a variable in script 2 :c
Report Abuse
testdummy5000 is not online. testdummy5000
Joined: 04 Jun 2010
Total Posts: 818
13 Aug 2014 07:40 AM
Well, than how would I go about Accessing a variable from a different script?
Report Abuse
IcyFires is not online. IcyFires
Joined: 29 Jun 2013
Total Posts: 5046
13 Aug 2014 08:11 AM
script 1

_G.x = 1

script 2
wait(1)
_G.x = 3

http://www.roblox.com/--item?id=171600495
Report Abuse
testdummy5000 is not online. testdummy5000
Joined: 04 Jun 2010
Total Posts: 818
13 Aug 2014 10:34 AM
Thank you c:
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • 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