API for detecting if a Prompt Purchase window is open

As a developer I need to check if the prompt purchase is open to ignore/sink inputs to avoid the prompt purchase window from triggering other logic in the game.

The way to check if a prompt purchase window is open is very tedious and involves creating your own variable and changing it based on the signals for a prompt succeeding and finishing. It’s also not very responsive as the event for finishing triggers a few seconds after the prompt window goes away.

It would be much more helpful if there was an api call for checking it on the client side like this:
MarketplaceService:IsPromptWindowVisible()

Here’s an old post of a dev also seeking a similar result

6 Likes

I think this is a good idea to have, something similar to:

local UserInputService = game:GetService("UserInputService")
print(UserInputService:GetFocusedTextBox())

but have it be

local UserInputService = game:GetService("UserInputService")
print(UserInputService:GetOpenPrompt())

The reason we do “GetOpenPrompt” is it might hold information for what prompt it is, either a gamepass, developer product or clothing prompt, etc.