Set the origin of the line sprite to the left.
set position to sprite1.x,sprite1.y
set width to distance(sprite1.x,sprite1.y,sprite2.x,sprite2.y)
set height to 2(or 3, or 4, or whatever height you want)
set angle to angle(sprite1.x,sprite1.y,sprite2.x,sprite2.y)