DotProduct keeps printing ''me see'' while the object is in a inappropriate angle

So the my dotproduct keeps printing ‘‘me see’’ meaning as it sees the object, however it keeps seing the object even if the object is in inappropriate angle, how can i fix this?


script border

while wait(0.001) do

local PathfindingService = game:GetService("PathfindingService")
local TweenService = game:GetService("TweenService")

-- Variables for the car and destination, etc.
local carprimary = script.Parent

local path = PathfindingService:CreatePath()

path:ComputeAsync(carprimary.Position, workspace.Location.Position)

local waypoints = path:GetWaypoints()

for _, waypoint in pairs(waypoints) do
	local part ="Part")
	part.Shape = "Ball"
	part.Material = "Neon"
	part.Name = "Pathfind_Point"	
	part.Size =, 0.6, 0.6)
	part.Position = waypoint.Position
	part.Anchored = true
	part.CanCollide = false
	part.Parent = game.Workspace
	local LocationFinder = script.Parent.Middle2.CFrame.LookVector
	local LocationFinder_Location = (script.Parent.Middle2.Position - workspace.Location.Position).Unit
	local dot = LocationFinder_Location:Dot(LocationFinder)
	if dot < 0.5 then
		print('me see')
		print('nah no see')



script border

What is the expected behavior of this script?

i think its when it is in sight of the object

Is the part following the object at all times?

I think this needs changing to this:

local LocationFinder_Location = (workspace.Location.Position - script.Parent.Middle2.Position).Unit

along with the if dot < 0.5 then changing to

if dot > 0.5 then