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: Variables confined to one script?

Previous Thread :: Next Thread 
stuff48 is not online. stuff48
Joined: 03 Aug 2012
Total Posts: 622
17 Aug 2017 04:48 PM
I'm new to scripting. So are variables confined to one script, or can they be used (with the same value) in another script?
Report Abuse
TinyGravity is not online. TinyGravity
Joined: 30 Apr 2016
Total Posts: 262
17 Aug 2017 04:50 PM
Yes, variables are only to be used in one script, unless they are a global variable
Report Abuse
litecoin is not online. litecoin
Joined: 22 Nov 2013
Total Posts: 62
17 Aug 2017 04:51 PM
You can have a Global Variable which is present GLOBALLY.

Or a local variable which is just in the script (Locally)

http://wiki.roblox.com/index.php?title=Global_function
Report Abuse
stuff48 is not online. stuff48
Joined: 03 Aug 2012
Total Posts: 622
17 Aug 2017 04:53 PM
ok so: "var1 = 1" will make var1=1 in all scripts and "local var1 = 1" will make it in only one script?
Report Abuse
TinyGravity is not online. TinyGravity
Joined: 30 Apr 2016
Total Posts: 262
17 Aug 2017 04:58 PM
Global variable: _G.Var1 = "hi" Global variable: Var2 = #### Local variable: Var3 = "ha" Kind of confusing, but you will get the hang of it
Report Abuse
TinyGravity is not online. TinyGravity
Joined: 30 Apr 2016
Total Posts: 262
17 Aug 2017 04:59 PM
Filters in Roblox these days...
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