Hey guys, today a simple question.
What is the point of making a "local" variable, when you can't use a variable in other scripts even if it global?
I know it might sound as a noob question, but I will be happy for any explanation, or an answer.
Thanks in advance!
A "local" Variable, is restricted to the enclosing function, If you wanted to not get confused with all your variables its quite useful.
Jim = "Jim" function example() local Bob = "Bob" print(Bob)-- Prints "Bob" print(Jim)-- Prints "Jim" end example() print(Jim) -- Prints "Jim" print(Bob) -- Errors