if self.Instance.Custom.DevProduct.Value > 0 then
) and not skipDevProductCheck
RecentDevProductButton[self.Tycoon.Instance][self.Instance.Custom.DevProduct.Value] = self
canBeBought = false
playSound = false
I know it says MarketPlaceService:UserOwnsGamePassAsync is their anything similar to this for dev products?
Dev products can be purchased more than once, so Roblox does not keep track of this data for you. You can read about handling purchases here
I have read this article and still no luck with what I am trying to do…
Essentially you can give MarketplaceService a callback function that will be automatically called whenever a player purchases a Dev product.
MarketplaceService.ProcessReceipt = function(receiptInfo)
local userId = receiptInfo.PlayerId
local productId = receiptInfo.ProductId
-- handle purchase
This is all the help that Roblox provides you, but knowing the purchaser’s UserId and purchased productId, you can do the rest. (You can get the Player instance with
From there, the documentation links to Data Stores, which you should then use to store that the player owns the product. There exist open source Datastore modules, such as Datastore2 that you could use to help make this process easier.
Okay I’ve got it to sorta work but every time I buy the product it gives me an error.
Content.Classes.Button:510: attempt to index number with 'WaitForChild'
The line that it’s talking about is
MarketPlaceService.PromptProductPurchaseFinished:Connect(function(plr, id, receiptInfo)
if receiptInfo then
if RecentDevProductButton[plr:WaitForChild("Tycoon").Value] then
This is Printing with