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: Index something with a space in the name?

Previous Thread :: Next Thread 
Daanni is not online. Daanni
Joined: 21 Mar 2010
Total Posts: 423
29 Dec 2013 08:44 PM
For example, (this is in a localscript)
game.Players.LocalPlayer.Character.Right Arm.Transparency = 1
It doesn't work cause there's a space. (Please note that I cannot rename the part)
How do I change it's tranpsrency?

"Why hasn't anyone invented edible birthday candles yet?"
Report Abuse
FreeScriptMaker is not online. FreeScriptMaker
Joined: 29 Nov 2013
Total Posts: 2275
29 Dec 2013 08:45 PM
game.Players.LocalPlayer.Character["Right Arm"].Transparency = 1
Report Abuse
CrniOrao is not online. CrniOrao
Joined: 12 Oct 2008
Total Posts: 2274
29 Dec 2013 08:45 PM
game.Players.LocalPlayer.Character["Right Arm"].Transparency = 1
Report Abuse
FreeScriptMaker is not online. FreeScriptMaker
Joined: 29 Nov 2013
Total Posts: 2275
29 Dec 2013 08:47 PM
@CrniOrao
You copy mai script
Report Abuse
brianush1 is not online. brianush1
Joined: 12 Sep 2009
Total Posts: 90
29 Dec 2013 08:48 PM
This is the best, in my opinion: game.Players.LocalPlayer.Character:findFirstChild'Left Arm'.Transparency=1
Report Abuse
CrniOrao is not online. CrniOrao
Joined: 12 Oct 2008
Total Posts: 2274
29 Dec 2013 08:50 PM
^_^ Not on purpose.
Report Abuse
KiwiMeister is not online. KiwiMeister
Joined: 18 Feb 2010
Total Posts: 1464
29 Dec 2013 08:52 PM
:O

worksapce['thing with spaces']:Destroy()

THIS IS LIKE FINDFIRSTCHILD?? THIS HELPS SO MUCH
Report Abuse
ToboboT is not online. ToboboT
Joined: 25 Jun 2011
Total Posts: 2385
29 Dec 2013 08:53 PM
Not exactly, if you use it the script will assume that it is there and not check to see if it is there.
Report Abuse
KiwiMeister is not online. KiwiMeister
Joined: 18 Feb 2010
Total Posts: 1464
29 Dec 2013 08:55 PM
yeah, of course
Report Abuse
broccoli7040 is not online. broccoli7040
Joined: 30 Jul 2009
Total Posts: 22
29 Dec 2013 08:56 PM
@brianush1

you forgot to put parentheses around the string in :findFirstChild(string) :)
Report Abuse
FreeScriptMaker is not online. FreeScriptMaker
Joined: 29 Nov 2013
Total Posts: 2275
29 Dec 2013 08:57 PM
@broccoli7040
You don't haz to do that what he did forget is to capitalize that f.
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
29 Dec 2013 08:57 PM
Only use FindFirstChild if it might not exist or the name of the child is the same as a name of a property of the object.

part["Name"]:Destroy() won't work since part["Name"] will be a string
part:FindFirstChild("Name"):Destroy() on the other hand will destroy the part (assuming it exists)
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