Whenever I buy something in studio, .PromptProductPurchaseFinished does not fire after the purchase.
Script:
MarketplaceService.PromptProductPurchaseFinished:Connect(function(UserId, ProductId, Purchased)
print("bought")
if Purchased == true then
local plr = game:GetService("Players"):GetPlayerByUserId(UserId)
local AssetId = MarketplaceService:GetProductInfo(ProductId)
if AssetId == 34 then
print("Gamepass Bought by"..plr.Name)
end
end
end)
MarketplaceService.PromptProductPurchaseFinished:Connect(function(UserId, ProductId, Purchased)
print("bought")
if Purchased == true then
local plr = game:GetService("Players"):GetPlayerByUserId(UserId)
local AssetId = MarketplaceService:GetProductInfo(ProductId)
if AssetId == 34 then
print("Gamepass Bought by"..plr.Name)
end
end
end)