|
| 07 Jan 2016 07:47 PM |
you know, like:
"local cat =
do local cat = print(cat) end"
or something idk i am getting pissed off |
|
|
| Report Abuse |
|
|
Link5659
|
  |
| Joined: 04 Jun 2012 |
| Total Posts: 4525 |
|
|
| 07 Jan 2016 07:49 PM |
local lol = { game.Workspace.lol game.Workspace.lol1 game.Workspace.lol2 game.Workspace.lol3 } |
|
|
| Report Abuse |
|
|
|
| 07 Jan 2016 07:57 PM |
it helps to understand scope
/Domingo en fuego/ |
|
|
| Report Abuse |
|
|
Darkenus
|
  |
| Joined: 17 Jul 2014 |
| Total Posts: 1997 |
|
|
| 07 Jan 2016 08:03 PM |
It helps to understand what 'local' really means, by Google-ing it:
Google > 'definition of local' |
|
|
| Report Abuse |
|
|
Aethex
|
  |
| Joined: 16 Oct 2011 |
| Total Posts: 2193 |
|
|
| 07 Jan 2016 08:04 PM |
| like dermon said, read this: http://wiki.roblox.com/index.php?title=Scope |
|
|
| Report Abuse |
|
|
|
| 07 Jan 2016 08:07 PM |
You need to understand what scopes are.
Local variables themselves are just variables that can only be accessed by code in the same scope. Local variables can be quite useful in some situations, and are faster to read from. |
|
|
| Report Abuse |
|
|
|
| 07 Jan 2016 08:36 PM |
function add(x, y) local sum = x + y print(sum) end
'sum' is a local variable inside of the function add. It can't be accessed outside of add. |
|
|
| Report Abuse |
|
|