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 |
|
|
|
| 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
|
  |
| 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
|
  |
| 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 |
|
|
|
| 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 |
|
|
|
| 17 Aug 2017 04:59 PM |
| Filters in Roblox these days... |
|
|
| Report Abuse |
|
|