Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do i make Parts move with a script?

Asked by 9 years ago

I did testing and i can't figure out how to make parts move with a script.. :/

1 answer

Log in to vote
2
Answered by
BlueTaslem 18071 Moderation Voter Administrator Community Moderator Super Administrator
9 years ago

Use can use the following:

  • On Models, you can use MoveTo to move a model to a Vector3 position

  • On Parts, you can set the Position property, which is a Vector3 (breaks snaps, does collision checks -- not usually what you want)

  • On Parts, you can set the CFrame property, which is a CFrame. This does not break snaps or do collision checks -- this is usually what you want


You can use physics to move parts, also. Less consistent, less accurate and precise

  • Setting the Velocity property can give parts an instant impulse in a direction

  • A BodyForce will continually accelerate a part in a direction (note that the acceleration (multiply by mass to get force) of gravity is ~196 studs / second ^ 2)

  • A BodyVelocity will maintain an object's velocity around a target one.

  • A BodyPosition will pull an object towards a particular position

0
Thanks my Parts can move now. :D masterhalo55 75 — 9y
Ad

Answer this question