ive been trying to figure this out for over a hour and I can't. Im trying to do something if the player actually buys the gamepass. I would prefer to do it in this if statement because this if statement is in a touched event and the only way to get the gamepass ID is to get it from the touched event
if game:GetService("MarketplaceService"):UserOwnsGamePassAsync(player.UserId,v.Gamepass.Value) then
print("player already has pass")
else
game:GetService('MarketplaceService'):PromptGamePassPurchase(player,v.Gamepass.Value)
print("bought")
end

1 comment
Is "v.Gamepass.Value" The Game Pass Id? if it is , then this script should work. What seems to be the problem here?