Techante
|
  |
| Joined: 17 Oct 2011 |
| Total Posts: 2101 |
|
|
| 19 Jun 2014 11:18 AM |
for y = y, y+10, 1 do script.Parent.Position = Vector3.new(0, y, 0) wait(1) end
This won't work, I want the brick to move up 10 studs, no matter what height it is at originally. |
|
|
| Report Abuse |
|
|
|
| 19 Jun 2014 11:19 AM |
for y = 1, 10 do --leaving the third argument empty will have it as 1 script.Parent.CFrame = CFrame.new(0, y, 0) --use cframe so that it would go through objects wait(1) end
|
|
|
| Report Abuse |
|
|
|
| 19 Jun 2014 11:20 AM |
for y = 1, 10 do script.Parent.CFrame = script.Parent.CFrame * CFrame.new(0, y, 0) wait(1) end
--forgot something, use this script instead |
|
|
| Report Abuse |
|
|
TradeDEV
|
  |
| Joined: 15 Jun 2014 |
| Total Posts: 299 |
|
|
| 19 Jun 2014 11:21 AM |
b = Workspace.Part
for y = 1, 10 do b.CFrame = CFrame.new(0,y,0) wait(1) end
@TradeDEVRBLX |
|
|
| Report Abuse |
|
|
Techante
|
  |
| Joined: 17 Oct 2011 |
| Total Posts: 2101 |
|
|
| 19 Jun 2014 11:22 AM |
| I was going to say that that wouldn't work xD Anyway, thanks :P I did change it to CFrame, I did that at first and it didn't work, and then I realised I did CFrame3.new when it should have just been CFrame.new. |
|
|
| Report Abuse |
|
|
|
| 19 Jun 2014 11:23 AM |
you needed this too
part.CFrame = part.CFrame * --this CFrame.new()
or else it wouldnt go up from where it was originally |
|
|
| Report Abuse |
|
|
TradeDEV
|
  |
| Joined: 15 Jun 2014 |
| Total Posts: 299 |
|
|
| 19 Jun 2014 11:25 AM |
Wouldn't it be added not multiplied?
@TradeDEVRBLX |
|
|
| Report Abuse |
|
|
Techante
|
  |
| Joined: 17 Oct 2011 |
| Total Posts: 2101 |
|
|
| 19 Jun 2014 11:25 AM |
Ok, but I want it to go up 0.2 studs each time, how do I do that then, cause this won't work:
for y = 1, 100, 0.2 do script.Parent.CFrame = script.Parent.CFrame * CFrame.new(0, y, 0) wait(0.5) end |
|
|
| Report Abuse |
|
|
|
| 19 Jun 2014 11:26 AM |
| You cant add using CFrame, only subtracting, dividing, and multiplying. |
|
|
| Report Abuse |
|
|
|
| 19 Jun 2014 11:27 AM |
for y = 1, 10 do script.Parent.CFrame = script.Parent.CFrame * CFrame.new(0, y/5, 0) --y/5 instead of y wait(0.5) end |
|
|
| Report Abuse |
|
|
TradeDEV
|
  |
| Joined: 15 Jun 2014 |
| Total Posts: 299 |
|
|
| 19 Jun 2014 11:29 AM |
My apologies I was thinking about CFrames's and Vector3's
@TradeDEVRBLX |
|
|
| Report Abuse |
|
|