Fancade Wiki

The raycast can't detect a block that had been created in the same frame, you have to wait 1 frame after creating the object for raycast to detect it.

Why is created block not detected by raycast? — Fancade Wiki