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
 

Re: An INCREDIBLY easy to fix problem..

Previous Thread :: Next Thread 
nathan2469 is not online. nathan2469
Joined: 23 Jul 2008
Total Posts: 1731
23 Feb 2015 09:03 PM
I'm relatively new to scripting, and I was wondering...



How do you identify instances with spaces?


What I mean by this, is, say I want to do something with my right arm. I know you have to do something deeper then just saying

Player.Character.Right Arm

I know this is a very simple question, but I couldn't figure out the solution...
Report Abuse
KOTwarrior is not online. KOTwarrior
Joined: 13 Jun 2012
Total Posts: 4376
23 Feb 2015 09:04 PM
Player.Character['Right Arm']
Report Abuse
nathan2469 is not online. nathan2469
Joined: 23 Jul 2008
Total Posts: 1731
23 Feb 2015 09:05 PM
Thanks.
Report Abuse
cooldude999921 is not online. cooldude999921
Joined: 13 Aug 2011
Total Posts: 3702
23 Feb 2015 09:16 PM
You can also do this


Player.Character:FindFirstChild("Right Arm")

:FindFirstChild(string) is just a method to find an instance named after it's string, and returns true if found

btw join - http://www.roblox.com/My/Groups.aspx?gid=468509
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
23 Feb 2015 09:18 PM
Small tiny tip that might save you later:
You have to use FindFirstChild if the name of your child is a property name of the object you are looking through.
Report Abuse
TooKawaiiForSenpai is not online. TooKawaiiForSenpai
Joined: 03 Mar 2009
Total Posts: 3241
23 Feb 2015 10:39 PM
Another tiny tip that might save you later:
FindFirstChild will return nil if the object is not found. Instance["Thing That Doesn't Exist"] will crash your program
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