FindPartOnRayWithWhitelist ignores the whitelist

yeah the title pretty much explains it my ray ignores the whitelist heres the script

local whitelist = {}
			table.insert(whitelist,hitbox)
			local ray1 = Ray.new(hitbox.Position+Vector3.new(largestsize,0,0),hitbox.Position)
			local ray2 = Ray.new(hitbox.Position+Vector3.new(0,largestsize,0),hitbox.Position)
			local ray3 = Ray.new(hitbox.Position+Vector3.new(0,0,largestsize),hitbox.Position)
			local hit1,pos1,surfnorm1 = workspace:FindPartOnRayWithWhitelist(ray1,whitelist)
			local hit2,pos2,surfnorm2 = workspace:FindPartOnRayWithWhitelist(ray2,whitelist)
			local hit3,pos3,surfnorm3 = workspace:FindPartOnRayWithWhitelist(ray3,whitelist)

FindPartOnRay is deprected, why are you still using it? I recommend using the new Workspace:RayCast along with RaycastParams, which also have a whitelist/blacklist parameter.

i am using it because workspace:raycast didnt work for me. i have a separate post about it

it was simply just returning nil