Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How would I decline a developer product purchase?

I am creating a song purchasing system and I want to decline the developer product if the sound ID is not correct so how would I return something that would not allow the purchase to go through.

1 answer

What you can do is check to see if the Id is correct using the method GetProductInfo of MarketplaceService before initiating the purchase:

local m = game:GetService('MarketPlaceService')
local id = 0

if m:GetProductInfo(id).AssetType == 3 then -- if id is associated with a sound
    -- initiate purchase
end

An example ^

This discussion is preserved as it was. New answers, comments, and votes are closed.