function NpcModule.RayY(p,f,s)local b=Ray.new(Vector3.new(p,(s:GetPivot()).Y*2,f),Vector3.new(p,-((s:GetPivot()).Y*4),f))local m=workspace:FindPartOnRayWithIgnoreList(b,RayYIgnore)if m~=nil then if m.CanCollide==false then table.insert(RayYIgnore,m)NpcModule.RayY(p,f,s)else if table.find(RayYIgnore,m)then table.remove(RayYIgnore,table.find(RayYIgnore,m))end return m.Position.Y end end end

function NpcModule.RayY(X,Z,Npc)
	local rayY = Ray.new(Vector3.new(X,Npc:GetPivot().Y * 2, Z), Vector3.new(X, -(Npc:GetPivot().Y * 4), Z))
	local Pos = workspace:FindPartOnRayWithIgnoreList(rayY, RayYIgnore)
	if Pos ~= nil then
		if Pos.CanCollide == false then
			table.insert(RayYIgnore, Pos)
			NpcModule.RayY(X,Z,Npc)
		else
			if table.find(RayYIgnore, Pos) then
				table.remove(RayYIgnore, table.find(RayYIgnore, Pos))
			end
			return Pos.Position.Y
		end
	end
end


