Hi,
In my game I want to prompt users to buy Bundles however, ROBLOX made a “new ID system” (I don’t know how to describe it) for the Bundles.
Normal:
“New”:
How do I prompt players to buy Bundles (in game) using the PromptPurchase function or using any other functions? I tried using the ID from an Anthro package to prompt purchase but it doesn’t work.
I don’t think any of the purchase APIs support bundles right now, they only work with the old AssetType. You have two options here; either you can fetch the catalog Id of the bundle or you can file a feature request to allow for bundles to be purchased.
I actually had a post about this a while ago but figured it out. What you have to do is get an asset from the bundle using AssetService:GetBundleDetailsAsync(bundleId), get the first asset from the Items part of the dictionary, then find the digits in the description to get the old bundle assetId, then PromptPurchase those digits, and it should give you something like this:
Here’s the exact code that I used, I forgot that I must get the old link from the description of the asset like this:
local bundleId = 39
local AssetService = game:GetService('AssetService')
local MarketplaceService = game:GetService('MarketplaceService')
local BundleItems = AssetService:GetBundleDetailsAsync(bundleId).Items
local FirstBundleInfo = MarketplaceService:GetProductInfo(BundleItems[1].Id)
local OldBundleId = string.match(FirstBundleInfo.Description, "%d+")
MarketplaceService:PromptPurchase(game.Players.LocalPlayer, OldBundleId)
Took me a few hours to figure it out, so hope you enjoy!
I have used the code and an error pops up, any idea why?
script.Parent.MouseClick:Connect(function(p)
local bundleId = 495
local AssetService = game:GetService('AssetService')
local MarketplaceService = game:GetService('MarketplaceService')
local BundleItems = AssetService:GetBundleDetailsAsync(bundleId).Items
local FirstBundleInfo = MarketplaceService:GetProductInfo(BundleItems[1].Id)
local OldBundleId = string.match(FirstBundleInfo.Description, "%d+")
MarketplaceService:PromptPurchase(p, OldBundleId)
end)
It appears Roblox has stopped alllowing this method to occur.
Early bundles (Such as the one that I provided code for) will work, as it gets an asset in the bundle and holds a link to it
Hey, do you by any chance know if that method still works? I tried it with bundles such as Korblox Deathspeaker and it brings up the bundle page but clicking buy has no effect.
If not, are you aware of any methods that allow you to sell the bundle in-game to make a commission off of them? I am mostly asking this in attempts to make a commission out of Headless Horseman.