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
 

anyone can...

Previous Thread :: Next Thread 
darkari805 is not online. darkari805
Joined: 06 Aug 2011
Total Posts: 12915
09 Aug 2012 04:58 PM
anyone can tell me what are the Variables and what is it for and explain it for me?
Report Abuse
darkari805 is not online. darkari805
Joined: 06 Aug 2011
Total Posts: 12915
09 Aug 2012 05:01 PM
please?
Report Abuse
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
09 Aug 2012 05:03 PM
Basically they are shortcuts. For example, if you tired writing the same things over and over you can use a variable like:

script.Parent.Transparency = 0
script.Parent.Transparency = 0.1
script.Parent.Transparency = 0.2
..etc

You can shorten it with:

Brick = script.Parent
Brick.Transparency = 0
Brick.Transparency = 0.1
...etc

Though, with the same example, that could be further shorten with a "for loop".

Brick = script.Parent
for i = 0, 1, 0.1 do --i is the iterator variable, starts at 0, ends at 1, and goes in increments of 0.1
Brick.Transparency = i
wait(0.1)
end

For more help:

http://wiki.roblox.com/index.php/In-Depth_Scripting_Guide#Variables
http://wiki.roblox.com/index.php/Loops#For

† KMXD †
Report Abuse
darkari805 is not online. darkari805
Joined: 06 Aug 2011
Total Posts: 12915
09 Aug 2012 05:03 PM
sorry i must bump this
Report Abuse
zakary99 is not online. zakary99
Joined: 19 Jan 2010
Total Posts: 1095
09 Aug 2012 05:04 PM
Variables are like simplifying something.
For example:
for i=0.01, 1, 0.01 do -- i is the variable. The letter i is the variable.

Or

zak=game.Lighting.Map
zak:Clone().Parent=game.Workspace


~If you value your existence, there's one thing you never ever put in a trap... Me!~
Report Abuse
darkari805 is not online. darkari805
Joined: 06 Aug 2011
Total Posts: 12915
09 Aug 2012 05:06 PM
@KnightmareXD thanks for helping me im trying to learn scripting
Report Abuse
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
09 Aug 2012 05:07 PM
You're welcome. Sorry for the occasional grammatical mistakes, I forgot to check over my typing. :P

† KMXD †
Report Abuse
zakary99 is not online. zakary99
Joined: 19 Jan 2010
Total Posts: 1095
09 Aug 2012 05:18 PM
Knightmare, we keep coming by eachother in this forum. xD


~If you value your existence, there's one thing you never ever put in a trap... 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