Need Help with MarketplaceService

The Code is below, i only want the player to be able purchase 1 Fire_Work Not 2.


On line 15, that expression will always evaluate to true because you’re testing the variable with itself. Were you trying to use reciept.ProductId == ID instead?

2 Likes

To handle Developer Products, you should return Enum.ProductPurchaseDecision.PurchaseGranted if the purchase succeeds, and Enum.ProductPurchaseDecision.NotProcessedYet if the purchase doesn’t succeed. Here is the guide

And you should to save this tool to a DataStore to ensure it isn’t deleted if the player leaves.

Uh, even if i do reciept.ProductId == ID, it still doesn’t do anything. when i purchase the developer product it gives me 1. then if i click it again and buy it again it gives me 2.

Have you tried my suggestion?


Yeah your solution worked i appreciate it homie :+1:t4:

1 Like

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