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
We use cookies to offer you a better experience. By using Roblox.com, you are agreeing to our Privacy and Cookie Policy.
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

"local" Command... Help?

Previous Thread :: Next Thread 
WolverineBoyScout593 is online. WolverineBoyScout593
Joined: 26 May 2012
Total Posts: 2311
14 May 2015 02:42 PM
local Part = Transparency = 0.5

I'm trying to learn how to script, but i'm stuck on the "local" command. I'm learning by the wiki, and I just can't seem to learn how to do it. I know what it's supposed to do, but how to do it I dunno. I've tried similar ways like the command above, but it won't work. Just need to know the structure of it, which I can't seem to get.

Thanks :D
Report Abuse
epicbreaker is not online. epicbreaker
Joined: 23 Apr 2011
Total Posts: 2791
14 May 2015 02:43 PM
local Part = workspace.Part
Part.Transparency = 0.5
Report Abuse
warspyking is not online. warspyking
Joined: 15 Nov 2011
Total Posts: 13947
14 May 2015 02:44 PM
Part.Transparency = 0.5


You aren't declaring a variable. local is for declaring variables, for example


x = 5 --This is global

local x = 5 --This is local
Report Abuse
WolverineBoyScout593 is online. WolverineBoyScout593
Joined: 26 May 2012
Total Posts: 2311
14 May 2015 02:45 PM
Thanks.
Report Abuse
Klink45 is not online. Klink45
Joined: 06 Jun 2011
Total Posts: 26054
14 May 2015 02:45 PM
Well, maybe it is the way that is written.

local Part = Transparency = 0.5 will not work because you can't declare the name of the property.

But, if you try this, it will work.

local thing = 0.5
Part.Transparency = thing

This works because you are just saying the property's value.
Report Abuse
warspyking is not online. warspyking
Joined: 15 Nov 2011
Total Posts: 13947
14 May 2015 03:08 PM
np :)
Report Abuse
Causticity is not online. Causticity
Joined: 11 Jun 2012
Total Posts: 530
14 May 2015 03:12 PM
I wouldn't even worry about the scope of a variable until you know what a variable is
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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