generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: [Noob questions alert!]

Previous Thread :: Next Thread 
Flylux is not online. Flylux
Joined: 23 May 2010
Total Posts: 4804
09 Jan 2014 12:05 PM
Can I just ask, what is the difference between a Variable and "local"
They seem to do the same thing, clear this up for me?
Report Abuse
robomax11 is not online. robomax11
Joined: 07 Jul 2011
Total Posts: 6828
09 Jan 2014 12:05 PM
local variables are client side
variables are server side
Report Abuse
Flylux is not online. Flylux
Joined: 23 May 2010
Total Posts: 4804
09 Jan 2014 12:07 PM
Thanks!
Report Abuse
Kingmouli is not online. Kingmouli
Joined: 28 Sep 2012
Total Posts: 1292
09 Jan 2014 12:08 PM
Erm...no
Report Abuse
Darthnoodles98 is not online. Darthnoodles98
Joined: 02 Apr 2011
Total Posts: 418
09 Jan 2014 12:38 PM
You probably won't need both.
Report Abuse
danster1000000 is not online. danster1000000
Joined: 22 Nov 2009
Total Posts: 165
09 Jan 2014 02:06 PM
A normal Variable is accessible by all parts of the script it is in. A local variable is only accsesable by the scope it is in, so:

Hi=1
print(Hi)--prints 1

if true then
local Hi=2
print(Hi)--prints 2
end

print(Hi)--prints 1 again

Scope is basically as how tabbed in you are, if you tab as robloxs auto tabbing system works.
Report Abuse
feskeral is not online. feskeral
Joined: 09 Dec 2013
Total Posts: 2729
09 Jan 2014 02:07 PM
I am not that great but I usually avoid locals because they are problematic for me.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image