Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Marketplace PromptPurchase CurrencyType Help?

So I have this working onclicked script that when you click it, it prompts you to buy pants, the thing is, I want it so that people buy it with Tickets instead of Robux, because people will be more willing to.

On the script editor, it has a red line under the '=' sign, and says

13:43:16.583 - Workspace.Model.Part.Script:2: ')' expected near '='

I'm looking at the page on the wiki, and I know the '=' isn't supposed to be like that, but I don't know any other way

This is the script

script.Parent.ClickDetector.MouseClick:connect(function(player)
	game:GetService("MarketplaceService"):PromptPurchase(player,assetId,currencyType = Default )
end)

1 answer

This is how you would use the third argument of PromptPurchase.

game:GetService("MarketplaceService"):PromptPurchase(player, assetId, "Default")

So, using the above example, if you wanted to prompt the user to buy in Tickets you would do the following.

game:GetService("MarketplaceService"):PromptPurchase(player, assetId, "Tix")

This discussion is preserved as it was. New answers, comments, and votes are closed.