I'm trying to make an auto generation map where a stored folder contains multiple connectable models. My goal is to get the two Connection-Parts (brown and beige in the photos) to connect to each-other. I've run into an issue where I can't get the whole structure to move with the Connection-Points; the Connection-Point is the only thing that moves. I've tried using CFrame to move the first Connection-Part (the beige one) to the second Connection-Part (the brown one) to make a 'sandwich' so that they connect. I tried welds too, but that didn't work either.

Before they're put together

After they're put together

Any help would be appreciated! Sorry if it's hard to understand what i'm trying to tell.

Here's the code, but don't let it confuse you.

local Connector1 = workspace.Structure1.Connector; -- Welded to the 'Walls'
local Connector2 = workspace.Structure2.Connector; -- Stationary; the connector that the Connector in Structure1 is trying to connect to...
Connector1.CFrame = Connector2.CFrame;
--Note: I didn't add anything to flip the model around so they aren't colliding with eachother

I've tried using PrimaryPartCFrame, and making the model rotate in the correct direction so they connect properly, but i'm doing something wrong... Is there a way to get the opposite rotation of the one it needs to connect to?

5 comments

0

Use text for links

0

okay

0

and show your code

0

the code wasn't very useful, it was pretty much one line changing the cframe of the welded connector to the next connector.

0

which did not work