local function n(n)return n==0 and 0 or n/math.abs(n)end function module.surface(R,Y)local z=(R.CFrame:toObjectSpace(CFrame.new(Y))).p local d=R.Size local l,r,y=math.abs(z.x/d.x),math.abs(z.y/d.y),math.abs(z.z/d.z)return Vector3.new(n(z.x),n(z.y),n(z.z))*Vector3.new((l>r and l>y)and 1 or 0,(r>l and r>y)and 1 or 0,(y>l and y>r)and 1 or 0)end

local function NumNormal(n)
	return n == 0 and 0 or n/math.abs(n)
end

function module.surface(part,point)
	local p = part.CFrame:toObjectSpace(CFrame.new(point)).p
	local s = part.Size
	local ax,ay,az = math.abs(p.x/s.x),math.abs(p.y/s.y),math.abs(p.z/s.z)
	return Vector3.new(NumNormal(p.x),NumNormal(p.y),NumNormal(p.z)) * Vector3.new(
		(ax>ay and ax>az) and 1 or 0,
		(ay>ax and ay>az) and 1 or 0,
		(az>ax and az>ay) and 1 or 0
	)
end