Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Raycasting Bug? Or just classic Roblox API? FindPartOnRay

I'm trying to detect a part on a ray.

I create a part at mouse.Hit.p (blue)

(hand,mouse.Hit.P)*0,0,-range (green)

pos from FindPartOnRay (black)

The first two spawn correctly, the the pos from FindPartOnRay spawns almost randomly, as if the mouse was elsewhere. Wondering why.

Any help greatly appreciated.

Here are the examples of where pos is going for some reason: https://gyazo.com/60faffd95d875c24b8495f9f5bfeee5b

1 comment

0

Weird. Raycasting sucks ever since they removed the (good) old tutorial.

1 answer

It was because I wasn't using mouse-targ.unit*range

This discussion is preserved as it was. New answers, comments, and votes are closed.