How to make gamepass/clothing purchase system?

I’m making a game where players can enter an assetID and other players can purchase it.
image
The problem I’m encountering is that gamepass IDs and product IDs are different. For example, the ID 843417370 can link to two places:

This issue also applies to using PromptPurchase, PromptProductPurchase, and PromptGamePassPurchase.
How should I overcome this ostacle?

1 Like

You may be able to use the second parameter of MarketplaceService:GetProductInfo(assetId: number, infoType: Enum.InfoType)

2 Likes

What is the infotype for t-shirts, shirts, and pants?
This does work for gamepasses, but im not sure how to use it for catalog items.

Also, I’m still not sure how to determine which type of purchase to use (PromptPurchase, PromptProductPurchase, and PromptGamePassPurchase.)

2 Likes

The infoType for these would be Asset

You’ll first want to check if the assetId is a GamePass by using the previous method :GetProductInfo(843417370, Enum.InfoType.GamePass) and if that fails, you can then assume its any other asset type and rerun that method with the Asset infoType. Then you can rely on the ProductType returned from the method to determine whether you need to use PromptPurchase or PromptGamePassPurchase

3 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.