I am making a GUI when you buy it you get the tool. But how do I use it?
✓ ANSWER ACCEPTED
How do I use PromptGamePassPurchaseFinished?
1 answer
✓ Accepted answer
PromptGamePassPurchaseFinished is event, so use it like you would use any other event. Just read the documentation for the parameters provided when the event fires. https://www.robloxdev.com/api-reference/event/MarketplaceService/PromptGamePassPurchaseFinished
Edit: Fixed link.
2 comments
0
Do I write like: player.PromptGamePassPurchaseFinished:Connect(function() ? Or how. BTW the link didnt work...
0
Its an event of MarketplaceService, not the player. So you would use Game:GetService("MarketplaceService").PromptGamePassPurchaseFinished:Connect(function(player,gamePassId,wasPurchased)[insert code here])
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
you first prompt the player to buy the game pass, then on the server, when that prompt is finished, clone the tool into their backpack