Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

What's the real difference between local and global variables?

Asked by 5 years ago

All I know is local variables are faster by a bit. But what's the overall difference, and should I use one over the other. What I do is use local but i don't know if I should keep doing it.

2
The difference between these two can be found all over the Internet, I don't need to post one. Roblox Wiki has one: https://www.robloxdev.com/articles/Scope LukeSmasher 619 — 5y

1 answer

Log in to vote
0
Answered by 5 years ago

Local variables only apply in the function or loops or if statements while Global variables are for interacting with the entire script

Ad

Answer this question