Collapse Sidebar


PromptPurchase is used to prompt a player to purchase an item with the given assetId. Below is a screenshot of the purchase dialogue that appears when this function is called.

The purchase dialogue triggered by PromptPurchase

The above dialogue was triggered using the following:

game:GetService("MarketplaceService"):PromptPurchase(game.Players.LocalPlayer, 4367427794)

For game passes, use MarketplaceService/PromptGamePassPurchase.


Name Type Default Description



Return Type Summary

Code Samples

Script (Server)

Since the below code is listening for a RemoteEvent/OnServerEvent to fire to the Server from a Client. Place this script somewhere on the Server such as within ServerScriptStorage.

LocalScript (Client)

The below example would prompt all new players to buy Beautiful Hair for Beautiful People when they click on a part.

Place this LocalScript somewhere on the Client such as within Players -> StarterPlayerScripts so that it will be able to fire a RemoteEvent/FireServer signal from a Client to the Server.