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: Space in a name

Previous Thread :: Next Thread 
skript92 is not online. skript92
Joined: 23 Jul 2013
Total Posts: 1430
13 Apr 2014 07:17 AM
Is there any way that I can include a name with a space in a script?
For example:


A = script.Parent.Right Arm <------ Can I?

while true do

A.CFrame = A.CFrame+Vector3.new(0,1,0)
wait(0.2)
A.CFrame = A.CFrame+Vector3.new(0,0,0)

end
Report Abuse
skript92 is not online. skript92
Joined: 23 Jul 2013
Total Posts: 1430
13 Apr 2014 07:20 AM
No one?
Report Abuse
skript92 is not online. skript92
Joined: 23 Jul 2013
Total Posts: 1430
13 Apr 2014 07:20 AM
No one? x2
Report Abuse
Geodesic is not online. Geodesic
Joined: 02 Jun 2013
Total Posts: 998
13 Apr 2014 07:21 AM
A = script.Parent['Right Arm']
Report Abuse
skript92 is not online. skript92
Joined: 23 Jul 2013
Total Posts: 1430
13 Apr 2014 07:21 AM
ok thanks :D Ill try
Report Abuse
Apocalyps is not online. Apocalyps
Joined: 15 Feb 2009
Total Posts: 816
13 Apr 2014 07:23 AM
No you cant do it like that, try this instead:

A = script.Parent["Right Arm"]

or

A = script.Parent:findFirstChild("Right Arm")

With the second one, you can also check if the part exists, like:

if A ~= nil then
-- It exists!
else
-- It doesnt exist!
end
Report Abuse
Vermis is not online. Vermis
Joined: 02 Jan 2013
Total Posts: 11501
13 Apr 2014 07:24 AM
"No you cant do it like that"

yes you can
Report Abuse
Apocalyps is not online. Apocalyps
Joined: 15 Feb 2009
Total Posts: 816
13 Apr 2014 07:25 AM
I was talking about this line:

A = script.Parent.Right Arm <------ Can I?

That piece of code will give an error
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