What solutions have you tried so far?
i tried to find solution on google, the devforum or even the developer hub, but i can’t find any solution to this problem, i tried many different calculation but can’t find the right one
EDIT: i found a gif that clarify what i’m trying to do
Hello, can you please tell us about what you’re trying to program, so we can help you further. It’s really important to make sure that we’re on the same track to give you sufficient help. Thank you.
Do you mean having a block connecting the two? You can use the gapfill plugin.
Or if you mean to script it, this might work
local thickness = -- Thickness
local Length = -- Length
local Attachment1 = -- Position of
local Attachment2 = --Position of
local magnitude = (Attachment1 - Attachment2).Magnitude
local Part = Instance.new("Part")
Part.Size = Vector3.new(magnitude, thickness, Length)
Part.Position = Attachment1 + Vector3.new(magnitude/2)
Part.Parent = workspace
i’m trying to position each model in order to get the 2 attachments to have the same WorldPosition. This GIF explain pretty well what i’m trying to do:
ahh, I see. So there is one thing you can do. Instead of an attachment you can use a part and set that as the primary part, and then simply set the primary part’s position to the other primary parts position.
i already made that in the past, but i’m trying using attachment this time so i could make the “attachment” between room much more simple to do. but after that you point that out, i might get a solution using both attachment and primary part
I agree with @VegetationBush’s solution, it’s easier to make, and it will work. I’ve used that with my colleague, when we were working on train scripts.
I found the solution !
We have 2 piece, 1 that is the base and 1 that is the piece we want to attach.
The way i did it is pretty simple. Create a part that have for CFrame the attachment to the piece we try to attach. Set it as PrimaryPart and Set the PrimaryPart CFrame to the CFrame of the attachment of the base piece.
Thanks to @Fliper05YT and @VegetationBush for helping
This is the best solution, I have tried many attempt but this is the best XD, ;-; i didn’t think about the primarypart before LOL XD, Thank you for sharing this helpful thing.