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: X/Y/Z cannot be assigned to

Previous Thread :: Next Thread 
Ob5idia is not online. Ob5idia
Joined: 29 Aug 2012
Total Posts: 44
03 Sep 2012 05:26 AM
Anytime my script involves the changing Position, Rotation, or Size (maybe more but those are what I have encountered) it never works and in the out put it will say "X/Y/Z (depends which was changing) cannot be assigned to". How could I fix this? Here's a line of code in which it will happen:
script.Parent.Size.Z = 180
That's just an example. Any ideas?
Report Abuse
sycips is not online. sycips
Joined: 21 Mar 2011
Total Posts: 1368
03 Sep 2012 06:50 AM
You always have to change size with Vector3.new(). You cant change size (x,y or z) with a number... You CAN use Size.x if you want the value of size x.
Report Abuse
ColorfulBone is not online. ColorfulBone
Joined: 08 Jun 2012
Total Posts: 323
03 Sep 2012 07:09 AM
It depends if your using command bar or basic scripting .
Report Abuse
Ob5idia is not online. Ob5idia
Joined: 29 Aug 2012
Total Posts: 44
03 Sep 2012 01:37 PM
Wrong. I tried both
Report Abuse
Ob5idia is not online. Ob5idia
Joined: 29 Aug 2012
Total Posts: 44
03 Sep 2012 07:22 PM
I'm a little confused. can you get me an example?
Report Abuse
xXSuperScripterXx is not online. xXSuperScripterXx
Joined: 31 Aug 2012
Total Posts: 26
03 Sep 2012 08:19 PM
script.Parent.Size = script.Parent.Size + Vector3.new(0,0,180)
Report Abuse
zakary99 is not online. zakary99
Joined: 19 Jan 2010
Total Posts: 1095
03 Sep 2012 08:21 PM
script.Parent.Size = Vector3.new(0, 0, 180)


~|Just so you know, I am a fan of teh Dino Nuggetz|~
Report Abuse
WhoBloxedWho is not online. WhoBloxedWho
Joined: 25 Mar 2009
Total Posts: 4611
03 Sep 2012 08:24 PM
.X, .Y, and .Z are all read only properties.


So you can use them in parts of code (Part.Position = Vector3.new(0,workspace.Part1.Position.Y,10) But you can't set them specifically.
Report Abuse
Ob5idia is not online. Ob5idia
Joined: 29 Aug 2012
Total Posts: 44
05 Sep 2012 01:57 AM
Thanks!!!!
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