function t.instance(r)assert(t.string(r))return function(X)local v,V=t.Instance(X)if not v then return false,V or""end if X.ClassName~=r then return false,string.format("\037\115 \101\120\112\101\099\116\101\100\044 \103\111\116 \037\115",r,X.ClassName)end return true end end
--[[**
	ensure value is an Instance and it's ClassName matches the given ClassName

	@param className The class name to check for

	@returns A function that will return true iff the condition is passed
**--]]
function t.instance(className)
	assert(t.string(className))
	return function(value)
		local instanceSuccess, instanceErrMsg = t.Instance(value)
		if not instanceSuccess then
			return false, instanceErrMsg or ""
		end

		if value.ClassName ~= className then
			return false, string.format("%s expected, got %s", className, value.ClassName)
		end

		return true
	end
end
