of     1   

wormexplode
#228356401Sunday, December 03, 2017 1:04 AM GMT

I've recently tried to learn Lua, and I've come across the word local. What does this do to a variable?
AggressiveCatch
#228356568Sunday, December 03, 2017 1:08 AM GMT

http://wiki.roblox.com/index.php?title=Scope See if that makes any sense to you. Here's a simple example: function test () a = 5 local b = 7 print(a) print(b) end print(a) print(b) >5 >7 >5 >nil
Aliics
#228356618Sunday, December 03, 2017 1:09 AM GMT

A local variable is a variable that is only accessible in it's nested location. Example: if (condition) then local _x = 5; -- _x can only be accessed in this if statement for i = _x, 0, -1 ## ## = i; -- It can also be accessed from things lower in the heirarchy. end end -- _x cannot be accessed here
Denny9876
#228356792Sunday, December 03, 2017 1:13 AM GMT

This link also tells you about "local" : http://wiki.roblox.com/index.php?title=Variable

    of     1