FindPartOnRay not working

Pictures underneath;

Code;
https://gyazo.com/637ce59f8bf8a55c5ad1fbcc715fa64f

Print;
https://gyazo.com/d694d1f2fa4db95363920232e1139812

In motion;
https://gyazo.com/7f46934e1e7e33d00996d9321c85896d

So for some reason, the ray’s Y value is being translated to the distance. How it does this I do not know. Hit is also nil, even though there is a clear straight pathway down.

What I want it do is, when the distance between the droppod and the blue part is = or smaller than 10, the blue part to turn transparent. As you can see it is not. Any tips to get it working is appreciated thanks.

Clarification: I want the blue part to turn transparent when the distance between the droppod (2000 studs above), is smaller than or equal to 10. Currently the distance is equaling whatever I put on line 40 of the code. (vector3.new(0, -10, 0)).
Extra: Hit is also returning NIL, so it is not recognizing any parts in its path.

Rbx file: Droppod.rbxm (4.8 KB)

Can you clarify what you’re attempting? The “in motion” doesn’t explain much. Can you also specify what your ignorelist is or even possibly provide an .rbxl file?

1 Like

I believe the reason you’re having an issue is because you only check if the distance is less than or equal to 10 once, you never check again. The reason it is saying what it has “hit” is nil is because the Ray is literally not hitting anything.

1 Like