I’m trying to make a script that will detect when a player buys a catalog accessory through a marketplaseservice prompt. I’ve looked all over google and found nothing. If it’s not possible is there any hacky solution I could use? (One I thought of would work by checking if the player owns the accessory when they click the button that prompts the purchase and then checking after that to see if they own it then)
1 Like
local MarketplaceService = game:GetService("MarketplaceService")
MarketplaceService.PromptPurchaseFinished:Connect(function(player, assetId, purchased)
if purchased then
print(player.Name, "bought the asset", assetId)
end
end)
1 Like
How did I not find this XD. I didn’t look hard enough at the marketplace service roblox wiki page lol. Thanks so much!
https://developer.roblox.com/en-us/api-reference/event/MarketplaceService/PromptPurchaseFinished
Just for anyone who visits the thread and is unaware of the API used.
1 Like