Creating attachments at the correct positions

Hey, Ben here.

I’m trying to work on my ragdoll script, however I want to keep it fully automatic (meaning I don’t have to go through and manually source the attachments (like the premade shoulder attachments), when I could remake them as for it to be automatic). However, I am having issues with getting the attachment to be close to the part it’s going to connect to.

It’s a bit hard to describe, but heres an image for it to help explain better.

The red shows what is actually happening, vs the blue, which is what I would like to happen.

Is there any way to get the attachment there automatically/ semi automatically?

I would set the attachment’s Position property via the script you are using. Example: A position of (0,1,0) would be one stud up from the middle of the parent part. You would have to mess with the numbers a bit for each part but that should do the trick. Hope this helped!

That’s what I was thinking, however that’s sort of semi automatic. Is there any way to do it by getting the top of the part/corner, seeing if it has “Right” in the name to then add (_, _, _) to the position

Yes, (TotalPartSize / 2) should do the trick.

Thanks, it’s much appreciated!

1 Like