orca101
|
  |
| Joined: 11 Sep 2009 |
| Total Posts: 6624 |
|
|
| 24 Jan 2012 12:52 PM |
| How can you make a model levitateon Y, but beable to move freely on X and Z? |
|
|
| Report Abuse |
|
|
orca101
|
  |
| Joined: 11 Sep 2009 |
| Total Posts: 6624 |
|
| |
|
|
| 24 Jan 2012 12:55 PM |
| so you mean have a constant position x studs above the ground, and be able to move along the other axis freely??? |
|
|
| Report Abuse |
|
|
orca101
|
  |
| Joined: 11 Sep 2009 |
| Total Posts: 6624 |
|
| |
|
superior
|
  |
| Joined: 13 Apr 2008 |
| Total Posts: 1662 |
|
|
| 24 Jan 2012 01:16 PM |
while wait(1) do a.Position + Vector3.new(0,1,0) --Add your own increment. end
|
|
|
| Report Abuse |
|
|
superior
|
  |
| Joined: 13 Apr 2008 |
| Total Posts: 1662 |
|
| |
|
orca101
|
  |
| Joined: 11 Sep 2009 |
| Total Posts: 6624 |
|
|
| 24 Jan 2012 01:18 PM |
@Superior But wouldn't that only work with one part? |
|
|
| Report Abuse |
|
|
|
| 24 Jan 2012 01:20 PM |
Superior, that would make it escalate constantly. And it doesn't work as it is right now.
I'd prefer not using loops for this - try some of the physics-objects of ROBLOX (BodyPosition, BodyGyro, BodyForce. You name it)
However, a loop could look like this:
local height = 4 -- constant.
while true do script.Parent.Position = Vector3.new(script.Parent.Postition.x, height, scirpt.Parent.Position.z) wait() end
It's very inefficient. As I said, I prefer using BodyPositions or such for this. :) But you all decide what you prefer. |
|
|
| Report Abuse |
|
|
|
| 24 Jan 2012 01:21 PM |
| If you're going to do it with an entire model, I'd definitely go for some of the physics-objects. You could always _try_ BodyPosition. |
|
|
| Report Abuse |
|
|
orca101
|
  |
| Joined: 11 Sep 2009 |
| Total Posts: 6624 |
|
|
| 24 Jan 2012 01:25 PM |
| @Raven Well, I tried using bodyposition, but my model would always tip up as it moved along. Any idea what the values on the bodyposition could look like to stop that? |
|
|
| Report Abuse |
|
|