My Raycasting system (whom I wish to use as a surveillance system for enemy robots) does not return any part even when I put the the robot in a closed room (as shown below) where it has to hit at some point. I tried with directions (0,-100,0) and those were the only instances where it hit.

(indeed the ray detects no part here)
The script is as follows:
local raycastParams = RaycastParams.new()
raycastParams.FilterType = Enum.RaycastFilterType.Blacklist
raycastParams.FilterDescendantsInstances = {script.Parent.Parent.Head}
raycastParams.IgnoreWater = true
local detection=workspace:Raycast(script.Parent.Parent.Head.Position, script.Parent.Parent.Head.CFrame.LookVector, raycastParams)
if detection then
print("successful!")
part=Instance.new("Part",workspace)
part.Anchored=true
part.CanCollide=false
part.Position=detection.Position
game:GetService("Debris"):AddItem(part,5)
else
print("no ray :(")
end
end
Any idea what might be the issue there?