Create a brick in-between two points?

I’ve never really experimented with CFrame. I’m trying to create something like this:
image

I have two blocks, I need to create a wire-like part in-between the two parts. How would I do this?

Well the math is a bit confusing.

Basically, you need two points, one as the starting area and the other one as the ending area. Then, you are going to use CFrame.new to set the posiiton of the wire to the starting area, and make it face to the ending area. And you are going to need position the wire to the midway between these 2 areas, whilst calculating how long between are them in order to make the wire has an accurate size.

1 Like

Yeah I figured I’d have to do something with CFrame, but how do I calculate all of this?

Correct me if I’m wrong.

local Position = CFrame.new(startPosition, endPosition) * CFrame.new(0,0, -distanceBetweenTwoPoints/2)

local Size = Vector3.new(1,1,distanceBetweenTwoPoints)
1 Like