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: Invalid Enum?

Previous Thread :: Next Thread 
SmoothBlockModel is not online. SmoothBlockModel
Joined: 26 Sep 2008
Total Posts: 2155
31 Dec 2012 11:07 PM
Im trying to put a Character Mesh into a player, I have to MeshIds in the top Table and the Bodyparts they go with in the bottom.

local charMeshes ={27111419,27111857,27111864,27111882,27111894}
local bodyParts = {"LeftArm","LeftLeg","RightArm","RightLeg","Torso"}
for z = 1,6 do
local bodyMesh = Instance.new("CharacterMesh")
bodyMesh.Parent = v.Character
bodyMesh.MeshId = charMeshes[z]
bodyMesh.BodyPart = bodyParts[z]
end

It keeps saying for the BodyPart = bodyParts[z] it is an Invalid Enum.. Help?
Report Abuse
MeBilly8440 is not online. MeBilly8440
Joined: 27 Jul 2009
Total Posts: 2783
31 Dec 2012 11:20 PM
bodyMesh.BodyPart = Enum.BodyPart[bodyParts[z]]
Report Abuse
SmoothBlockModel is not online. SmoothBlockModel
Joined: 26 Sep 2008
Total Posts: 2155
31 Dec 2012 11:44 PM
It says String expected, Got nil
Report Abuse
MeBilly8440 is not online. MeBilly8440
Joined: 27 Jul 2009
Total Posts: 2783
31 Dec 2012 11:47 PM
Oh, yeah... your loop goes up to 6, not 5... forgot to mention that. Change for "z = 1,6 do" to "for z = 1,5 do"
Report Abuse
WhoBloxedWho is not online. WhoBloxedWho
Joined: 25 Mar 2009
Total Posts: 4611
01 Jan 2013 02:04 AM
to be safe you could do

for z = 1, #charMeshes
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