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
|
  |
| 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 |
|
|
|
| 03 Sep 2012 07:09 AM |
It depends if your using command bar or basic scripting .
|
|
|
| Report Abuse |
|
|
Ob5idia
|
  |
| Joined: 29 Aug 2012 |
| Total Posts: 44 |
|
| |
|
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 |
|
|
|
| 03 Sep 2012 08:19 PM |
| script.Parent.Size = script.Parent.Size + Vector3.new(0,0,180) |
|
|
| Report Abuse |
|
|
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 |
|
|
|
| 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
|
  |
| Joined: 29 Aug 2012 |
| Total Posts: 44 |
|
| |
|