Ray casting uses two parameters, one of the origin position and the other of the direction, however, what I need is for it to ray cast from one point to another point.
You calculate the vector from point A to point B with
ABvector = pointB - pointA
local pointA = Vector3.new(1, 1, 1) local pointB = Vector3.new(-1, 1, 0) local ABvector = pointB - pointA -- Cast a ray from pointA to pointB local ray = Ray.new(pointA, ABvector)