Rick Posted May 4, 2014 Share Posted May 4, 2014 Using local before the variable name ensures it's not a global, right? If such a variable is passed with self:FunctionName (variable) does it remain non-global? Yes. Passing variables to functions does not change it's scope. However in the case you had you didn't have local in front of PlayerEnt. So unless above in that function you had: local PlayerEnt, and just didn't show us that code, PlayerEnt would have been global because you just had: PlayerEnt = entity Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.