Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How do i make Parts move with a script?

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

1 answer

✓ Accepted answer

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

1 comment

0

Thanks my Parts can move now. :D

This discussion is preserved as it was. New answers, comments, and votes are closed.