PromptProductPurchase is triggering BindAction on ButtonB

bugb.rbxl (56.3 KB)

I have this

ContextActionService:BindAction(id, function()
	print('lol')
end, false, Enum.KeyCode.ButtonB)

Which should be triggered when you press ButtonB on gamepad.

But it is being triggered when I call MarketplaceService:PromptProductPurchase(player, id) as well.

Hi!

This is actually not a bug! When the purchase prompt gets fired to open the purchase dialogue, it actually binds over ButtonB (and ButtonA!). This fires a cancel signal for your BindAction. You can verify this by printing the state inside your bind.


ContextActionService:BindAction("Test", function(action, state, object)
	print('lol')
	print(state)
	--if back then
	--	ClickedBack = true
	--end
	--menu.Visible = false
end, false, Enum.KeyCode.ButtonB)

local MarketplaceService = game:GetService("MarketplaceService")

script.Parent.Activated:Connect(function()
	MarketplaceService:PromptProductPurchase(game.Players.LocalPlayer, 1594203080)
end)