How to get direction vector between origin part and second part?

I get a part in a region3 and then have an origin point to raycast to the part, but my issue is i dont know how to get the direction for it to raycast properly, towards the part.

You can use .Unit for this, just subtract the final position from the starting position and then normalize everything with .Unit

local direction = (finalPosition - startPosition) .Unit

Any questions you can ask me ^^

If OP would like to simply see if a part can see another then it might be better to leave out the .Unit entirely. Then you wouldn’t have to multiply direction by anything.