AxeOfMen
|
  |
| Joined: 14 Dec 2011 |
| Total Posts: 196 |
|
|
| 25 Feb 2012 01:06 PM |
| I have a block that is moved around by changing its position via script. I want it to float close to the ground and to be able to stand on it and ride it as it moves. Whenever I stand on it, it moves up above my head. What should I do to prevent it from moving on the y-axis when i step on it? |
|
|
| Report Abuse |
|
|
nate890
|
  |
| Joined: 22 Nov 2008 |
| Total Posts: 21686 |
|
|
| 25 Feb 2012 01:08 PM |
It's going above your head because you're changing the position, instead of the cframe.
part.Position=Vector3.new(0,0,0) rather part.CFrame=CFrame.new(0,0,0)
"Bro five! Wear this to let everyone know you think they deserve a high five." |
|
|
| Report Abuse |
|
|
AxeOfMen
|
  |
| Joined: 14 Dec 2011 |
| Total Posts: 196 |
|
|
| 25 Feb 2012 01:21 PM |
| Thanks for your response. When I change the CFrame instead of the Position, it does not move above my head, so that's good. But now I can't ride on the block as it moves. Any advice? |
|
|
| Report Abuse |
|
|
stravant
|
  |
 |
| Joined: 22 Oct 2007 |
| Total Posts: 2893 |
|
|
| 25 Feb 2012 01:23 PM |
| Use the body* objects to move it rather than directly moving it, which confuses the physics. |
|
|
| Report Abuse |
|
|
Trioxide
|
  |
| Joined: 29 Mar 2011 |
| Total Posts: 32902 |
|
| |
|
stravant
|
  |
 |
| Joined: 22 Oct 2007 |
| Total Posts: 2893 |
|
|
| 25 Feb 2012 01:45 PM |
| Like, BodyPosition, BodyVelocity, etc There's a bunch of objects whose names start with "Body" for doing that sort of thing. |
|
|
| Report Abuse |
|
|