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

How do I unanchore model while not having it fall apart?

Asked by 1 year ago

Right now, I'm having the model move to a random place on the map and turn a certain orientation, but I can't get it to unachore without falling apart. I have heard of welding but don't know how to do that. Can anyone help me?

1 answer

Log in to vote
2
Answered by 1 year ago
Edited 1 year ago

Have you heard of Constraints? There are many types of Constraint such as HingeConstraint (used for doors) and RopeConstraint (used to connect two Parts with a rope). The main function of Constraints is to connect two Attachments either mechanically or by force.

What are Attachments?

If you already know what Attachments are, you can skip this part. Attachments are like Parts: they have their own position and rotation. The difference is that they have no size, and they don't move on their own, like 0-Dimensional.

An Attachment should be parented to a BasePart, and it always glued with the parent. If you create a new Attachment inside a Part, it will automatically be positioned to the Part's position (together with the rotation).

Mechanical and Mover Constraints

If you already know about these, you can skip this part. Mechanical Constraints act like real-life mechanics such as a door hinge (HingeConstraint), a pendulum (RopeConstraint), a joystick (BallSocketConstraint), and a spring (SpringConstraint).

Its alternative is the JointInstance which is like Constraints but it uses BaseParts instead of Attachments. Its main function is to connect Parts, kind of like joints.

Mover Constraints - from the name itself, it moves Parts.

Its deprecated alternative is the BodyMover.

Solution

Now that we know what Constraints are, we can finally use WeldConstraint.

All you got to do is create a WeldConstraint inside the model per two Parts, and set Part0 and Part1 to the two Parts. Watch this video on how to do it and what it does.

Ad

Answer this question