Hi all, I've been having some trouble with regards to the above problem. In-game, there will be a sign with the gamepass. I'm having trouble with scripting something that will prompt the purchase of it. I appreciate any help!
Do something like this:
local part = script.Parent local detector = part.ClickDetector local function promptPurchase(player) local service = game:GetService("MarketplaceService") service:PromptGamePassPurchase(player, "Gamepass ID goes here in number format") end detector.MouseClick:Connect(promtPurchase)
This is a basic script which prompts the purchase of a gamepass when a part is clicked. I'm pretty sure you can modify this script to suit your needs.
Closed as Not Constructive by climethestair and User#21908
This question has been closed because it is not constructive to others or the asker. Most commonly, questions that are requests with no attempt from the asker to solve their problem will fall into this category.
Why was this question closed?