|
| 21 Dec 2011 12:19 PM |
I am trying to make a large section of anchored bricks move up in unison, this is my current script:
function up() for n = 1, 538 do wait() for n = 1,222 do
script.Parent["Part" ..n].CFrame = CFrame.new(script.Parent["Part" ..n].Position + Vector3.new(0,0.1,0))
-- (The above is one line.)
end end end
It works well, but when it moves each of the bricks lose their set angle. How could I make it so that they keep their .fromEulerAnglezXYZ() property?
|
|
|
| Report Abuse |
|
|
|
| 21 Dec 2011 12:24 PM |
Because you use position to set it to a CFrame datavalue, it'll cut of the rotation. Also next time post this in SH.
function up() for n = 1, 538, 1 do wait() for n = 1, 222, 1 do script.Parent["Part" ..n].CFrame = CFrame.new(script.Parent["Part" ..n].CFrame + Vector3.new(0,0.1,0)) end end end
~Myrco; Music lover, nederlands/dutch and a scripter |
|
|
| Report Abuse |
|
|
sncplay42
|
  |
| Joined: 27 Nov 2008 |
| Total Posts: 11891 |
|
|
| 21 Dec 2011 12:32 PM |
Why have you passed a CFrame to CFrame.new
script.Parent["Part" ..n].CFrame = script.Parent["Part" ..n].CFrame + Vector3.new(0,0.1,0) |
|
|
| Report Abuse |
|
|