Basically whenever i instance a Prismatic Constraint with a script i get this error that one of the attachments are not aligned with the other but when i manuelly do it i dont get the error and yes when i manuelly use the attachment i use the same position.
You just need to rotate the Attachment1 so it’s aligned with the other attachment, like this:
Attachment1 can be facing forwards or backwards, depending on the direction of the Constraint
im using a script for it. it works fine when i do it manuelly but when i use the script i get this error.
Why would you do it with a script? Putting it into the Parts in Studio is so much easier.
If you put an Attachment into a Part with a Script then the Attachment’s axes will align with the Part’s axes. If you have to use a Script then you will have to rotate the Attachment to align it with the PrismaticConstraint’s Attachment axes.
Here’s the Roblox car tutorial: Building a Basic Car
Ok, so I’ll need you to show the code so we can analyze it
Wow, soooo complicated.
As I said, why go to all this issue with a script?
In studio you can do this with 4 or 5 clicks and see instantly what needs to be fixed.
The instructions on how to do it are in the tutorial I posted.
If you have to have a script then you need to change the Attachment.Orientation
of FLPC2
to match the one in FLPC1
in World space, not in comparison to the Part space.
thx for the suggestion i just changed the orientation of the attachment