Hey, so I’m trying to create a Crafting System this is the idea behind it:
Crafting system that combines three sword components: The Hilt, Crossguard and Blade
The Hilt and Blade and a child part called “AttachementPart” this is where the pieces should connect.
The Crossguard has child parts called “BottomPart”, and “TopPart” BottomPart is used to connect the hilt to the crossguard and top part is used to connect the blade to the crossguard. After they all get positioned correctly they should get welded together The completed sword should get put into a “Tool” in the Folder “Holder” in game.Workspace There should be three variables in the function called “selectedHilt”, “selectedCrossguard”, and “selectedBlade” These will be MeshParts, in the MeshPart the AttachmentParts will be there
I’ve only been having problems with moving the parts to the correct locations. All of the attachment points are in the correct area each respective part should be moved to, however I simply can’t completely figure it out.
If you want to “glue” two attachments together, you can create a weld with C0 equal to the Part0’s attachment CFrame and C1 to the Part1’s. However, i’m on my phone, so i’m not sure. Also, since it’s a weld, every part would need to be unanchored.
To make it to be able to drag and snap (which is what i think you mean by “positioned correctly”), maybe try use a DragDetector for dragging, then code some logic to get the mouse location and use WorldToScreenPoint to see if the distance between mouse location and the part being dragged’s screen position is about under 20 pixels, then snap
Appreciate the responses, used Tweenservice to actually do it.
Added a WeldConstraint to the Component and the AttachmentPoint then got the CFrame of the Crossguard AttachmentPoint then tweened it together. Thank you guys for the responses though.