How can I make a raycast from the bottom of a part?

I want to be able to fire a raycast outwards in the direction of a part’s bottom side, regardless of which direction the part is facing, like this:


I know how to send raycasts and use ignore lists, but I don’t know how to find the vector to send the raycast in that direction relative to the part’s orientation

Any help is appreciated

You take the parts position (origin) and add a downwards vector

local partPosition = part.Position
local RAYCAST_DOWN_VECTOR3 = Vector3.new(0, -50, 0)
raycastResult = workspace:Raycast(partPosition, RAYCAST_DOWN_VECTOR3)

if raycastResult then
	...
end
1 Like

try adding a caster reference part to the origianal part, that reference’s front face should be facing downwards

1 Like