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 » Scripters
Home Search
 

I don't understand this

Previous Thread :: Next Thread 
DanBossStar321 is not online. DanBossStar321
Joined: 26 Dec 2012
Total Posts: 27652
16 Apr 2015 06:43 PM
game.Workspace.WedgePart.Material = ENUM_VALUE

if you wanna change the material of a part...

Put it in a box and lock it
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
16 Apr 2015 06:50 PM
http://wiki.roblox.com/index.php?title=API:Enum/Material
So like Enum.Material.Smooth (or "Smooth" would also work)
Report Abuse
DanBossStar321 is not online. DanBossStar321
Joined: 26 Dec 2012
Total Posts: 27652
16 Apr 2015 06:51 PM
OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO
I thought you changed it with a number
thanks!

Put it in a box and lock it
Report Abuse
DiamondBladee is not online. DiamondBladee
Joined: 24 Feb 2013
Total Posts: 3527
16 Apr 2015 06:54 PM
Actually you could. Enums are special values. You can directly call them like so:

Enum.SurfaceType.Smooth
"Smooth"
0 (I think, but its a number)

Probably other ways. The strings are easy to read, the numbers can be useful if you're going for a random enum, and honestly I don't ever use the first method. Except for Pathfinding, because it doesn't seem to like strings when I do it.
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