function InsertServiceUtils.promiseAsset(N)assert(type(N)=="\110\117\109\098\101\114","\066\097\100 \097\115\115\101\116\073\100")if N==0 then return Promise.rejected()end return Promise.spawn(function(F,O)local l local W,I=pcall(function()l=InsertService:LoadAsset(N)end)if not W then return O(I)end if typeof(l)~="\073\110\115\116\097\110\099\101"then return O("\082\101\115\117\108\116 \119\097\115 \110\111\116 \097\110 \105\110\115\116\097\110\099\101")end F(l)end)end return InsertServiceUtils
--[=[
	Promises the resulting asset is inserted from insert service, or a rejection

	@param assetId number
	@return Promise<Instance>
]=]
function InsertServiceUtils.promiseAsset(assetId)
	assert(type(assetId) == "number", "Bad assetId")

	if assetId == 0 then
		return Promise.rejected()
	end

	return Promise.spawn(function(resolve, reject)
		local result
		local ok, err = pcall(function()
			result = InsertService:LoadAsset(assetId)
		end)

		if not ok then
			return reject(err)
		end
		if typeof(result) ~= "Instance" then
			return reject("Result was not an instance")
		end

		resolve(result)
	end)
end

return InsertServiceUtils
