for z=1,#points,1 do local w=points[z]local l=true repeat local z=Ray.new(w+Vector3.new(0,15,0),Vector3.new(0,-100,0))local b,e,u=workspace:FindPartOnRayWithIgnoreList(z,ignore)if b and(not b:IsA("\084\101\114\114\097\105\110")and not b.CanCollide)then l=false w=e table.insert(ignore,b)wait()else if b then l=true height=(char_cf:PointToObjectSpace(Vector3.new(0,e.Y,0))).Y+size.Y/3 else return nil end end until l if height then table.insert(all_height,height)end end
--		for i=1,#points do
--			print("POINT #:",i,points[i])
--			Pets.Visualize[i].CFrame = CFrame.new(points[i])
--		end
for i = 1, #points do
	local point = points[i]

	local done = true
	repeat
		local ray = Ray.new(point + Vector3.new(0, 15, 0), Vector3.new(0, -100, 0))

		local part, intersection, normal = workspace:FindPartOnRayWithIgnoreList(ray, ignore)
		if part and not part:IsA("Terrain") and not part.CanCollide then
			done = false
			point = intersection
			table.insert(ignore, part)
			wait()
		else
			if part then
				done = true
				height = char_cf:PointToObjectSpace(Vector3.new(0, intersection.Y, 0)).Y + (size.Y / 3)
			else
				return nil
			end
		end
	until done
	--if height then break end
	if height then
		table.insert(all_height, height)
	end
end
