The ProductId in that function is my own product, triple checked. I re-created the same Developer Product 2 times to try to see if it would work, but to no avail.
The issue is that when that line runs this is what is printed out:
AllowThirdPartySales has blocked the purchase prompt for 142392648 created by 26993195. To sell this asset made by a different user, you will need to enable AllowThirdPartySales.
What’s strange is that the ProductId is a completely different ProductId than my original product, and if I turned on AllowThirdPartySales, a random, but always the same, product would be brought up for purchase.
If I try to PromptProductPurchase with a ProductId of 0, it tells me that it the ProductId was below 0.
I don’t use any free models. It could be one of my plug-ins, but I haven’t changed them for months. I made a quick virus removal code, and the bug still exists.
When you are in the Developer Products section of the Creator Dashboard, if you click the 3 dots on the top right of a Dev Product and click Copy AssetId, that gives you the wrong Id for making Purchases. You need the ProductId, which is written below the Product’s name.
In this example the ProductId is “134941823.”
I was using the AssetId, instead of the productId. Very strange and complicated that Roblox would have both an AssetId and a ProductId for all its Developer Products, but there are both.
I tested in Studio, and it gives you the productId when you copy from Game Settings.