I am making a gui in my game that allows the player to buy the darkheart gamepass while they are in the game. This is the script:
function gamepass()
script.Parent.Parent.Parent.Parent = player
Game:GetService("MarketplaceService"):PromptPurchase(player, 155387134)
end
script.Parent.MouseButton1Click:connect(gamepass)
However it does not work when I click the button. Is something missing or incorrect?
