How do I use PromptGamePassPurchaseFinished
PLEASE DO DO NOT SEND A LINK, THE ROBLOX LINK IS LACKING!
Here is my script:
~~~~~~~~~~~~~~~~~
marketPlaceService = game:GetService("MarketplaceService")
script.Parent.MainShop.Invincibility.BuyPrompt.MouseButton1Click:Connect(function()
marketPlaceService.PromptGamePassPurchaseFinished(player, 5094834, true)
if true then
print ("Bought")
else
print("Not")
end
end)
Why do I get this error: attempt to call field 'PromptGamePassPurchaseFinished' (a userdata value)
Thank you so much in advance.

2 comments
'local onFinish', next line, 'onFinish = function' hurts my brain.
So what?