function t.instanceIsA(f,N)assert(t.string(f))local o if N~=nil then o=t.children(N)end return function(N)local r=t.Instance(N)if not r then return false end if not N:IsA(f)then return false end if o then local f=o(N)if not f then return false end end return true end end

function t.instanceIsA(className, childTable)
	assert(t.string(className))

	local childrenCheck
	if childTable ~= nil then
		childrenCheck = t.children(childTable)
	end

	return function(value)
		local instanceSuccess = t.Instance(value)
		if not instanceSuccess then
			return false
		end

		if not value:IsA(className) then
			return false
		end

		if childrenCheck then
			local childrenSuccess = childrenCheck(value)
			if not childrenSuccess then
				return false
			end
		end

		return true
	end
end
