Welcome developers, to the Constraint Library, this is the documentation. The model is not out yet as I have reached the model publishing limit so it is scheduled for December 20, 2023. Anyway. The documentation below is summarized to not be too complicated. The Constraint Library is open-sourced, that means anyone in the community can fix the scripts or modify the module. So far, we only have 3 functions.
constraint.CreateConstraint()
In a nutshell, what this function does is create a constraint. Which is also summarized by its name.
Arguments
Arguments 1 and 2 are the positions of the attachments 0 and 1, on global axis. (Vector3)
Argument 3 is the type of constraint to be created. It is a string value, make sure you spelled it correctly, because it is case sensitive.
Argument 4 is an instance value. It is the part the attachments and the constraint will be parented to. Make sure it is a BasePart, because attachments can only be parented to another one, or to a BasePart.
constraint.WeldParts() (Broken)
This function welds 2 parts together.
Arguments
Argument 1 and 2: Parts to be welded.
Argument 3: The type of weld. Can either be WeldConstraint or a regular Weld. (string value)
constraint.WeldModel() (New feature)
Can weld an entire model. More parts in a model makes it laggier. So make sure to use unions or meshes to optimize this function.
Arguments
Argument 1: The type of weld. Either set this to WeldConstraint or Weld. In this type of spelling (UpperCaseNoSpaces). (String value)
Argument 2: Model. This is the model that will be welded.
Please make sure to spell the functions in camelCase and replace the word constraint for a require()
function.
Get the module at: https://create.roblox.com/marketplace/asset/15676588606