How to use equipifpurchased argument on this lua:
local productId = 1242353
game.Players.PlayerAdded:connect(function(player)
Game:GetService("MarketplaceService"):PromptProductPurchase(player, productId)
end)
How to use equipifpurchased argument on this lua:
local productId = 1242353
game.Players.PlayerAdded:connect(function(player)
Game:GetService("MarketplaceService"):PromptProductPurchase(player, productId)
end)
The function definition is as following:
PromptProductPurchase( Instance player, int productId[, bool equipIfPurchased, CurrencyType currencyType] )
Everything between [] is optional. That means that equipIfPurchased is optional. If you would like to use it, you count the arguments: equipIfPurchased is the third argument. You want to equip when purchased? Then set the third argument to true. True is a boolean and is thus correct in this case.
Game:GetService("MarketplaceService"):PromptProductPurchase(player, productId, true)
This discussion is preserved as it was. New answers, comments, and votes are closed.
1 comment
Why -1 If i need help?