PromptGamePassPurchaseFinished Issues

So I’m not getting prompted with the gamepass. (This was an embarrassing mistake on my end but maybe someone with the same mistake could stumble across this and realize what they did wrong.)

local MarketplaceService = game:GetService("MarketplaceService")
local ID = 9692655

script.Parent.MouseClick:Connect(function(Player)
	if Player.PlayerVariables.Gamepasses.OwnsSprintCrystal == true then
		local gear = game.ReplicatedStorage.Gears["Sprint Crystal"]:Clone()
		gear.Parent = Player.Character
	else
		MarketplaceService.PromptGamePassPurchaseFinished:Connect(function(Player, ID, Purchased)
			if Purchased == true then
				local gear = game.ReplicatedStorage.Gears["Sprint Crystal"]:Clone()
				gear.Parent = Player.Character
			end
		end)
	end
end)

I’m pretty sure I’m just being stupid here, but I’m terribly confused.

Looks like you’re listening for the prompt to finish but forgot to prompt the purchase itself, use MarketplaceService:PromptGamepassPurchase()

2 Likes

Ohhh! The tutorial I was looking at was poorly explained so my brain just kinda died… Thanks so much. :smiley:

1 Like