So, for a weird reason, :PromptProductPurchase isn't working, nothing appear on the output, the prompt doesn't show up. (also the product exists lol)
Code :
local id = 1281319566
local market = game:GetService("MarketplaceService")
local plrs = game:GetService("Players")
local plr = plrs.LocalPlayer
local info = market:GetProductInfo(id, Enum.InfoType.Product)
while true do
wait(1)
script.Parent.Text = "Buy ! (R$ : "..info.PriceInRobux.." )"
end
script.Parent.MouseButton1Click:Connect(function()
market:PromptProductPurchase(plr, id)
end)
Same issue for :PromptGamepassPurchase :
local id = 54938026
local market = game:GetService("MarketplaceService")
local user = game:GetService("Players").LocalPlayer
local info = market:GetProductInfo(id, Enum.InfoType.GamePass)
while true do
wait(1)
script.Parent.Text = "Buy ! (R$ : "..info.PriceInRobux.." )"
end
script.Parent.MouseButton1Click:Connect(function()
market:PromptGamePassPurchase(user, id)
end)
Both of them are in a LocalScript

1 comment
thx