I have two vector3 points, and there is a part exactly positionned on the midpoint between them. The part is as long as the distance between the two points. How do I rotate it so it connects the two points?
So far what I've got
brick.Size=Vector3.new((tab[i]-tab[i+1]).magnitude,.2,0)
brick.CFrame=CFrame.new(.5*tab[i+1]+.5*tab[i])*CFrame.Angles(0,math.pi,0) --Gotta change that math.pi for something appropriate

4 comments
Why does my positionning method hurts to look at? xd
It's pretty complicated, when you could just get the average: (point1 + point2) / 2. Also not sure what 'tab' or 'i' is.
tab is the table in which the points are stored, and .5point1+.5point2 is the same thing. Also its 180 degrees facing the wrong way, how to I rotate it 180 degrees?
CFrame.new(position, lookAt) makes the front face of the object look at the second argument. Just change the second argument or switch the object's dimensions.