PcoWSkbVqDnWTu_dm2ix
We use cookies on this site to enhance your user experience
Collapse Sidebar

PromptPurchase

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.

Parameters

Name Type Default Description
true
Default

Ignored.

Returns

Return Type Summary

Code Samples


MarketplaceService:PromptPurchase

The below example would prompt all new players to buy Beautiful Hair for Beautiful People.

game.Players.PlayerAdded:Connect(function(player)
	game:GetService("MarketplaceService"):PromptPurchase(player, 16630147)
end)