Why is it still prompting me to buy the gamepass

local function playerOwnsGamePass(player)
    local success, hasGamePass = pcall(function()
        return player:HasGamePassAsync(gamePassID)
    end)


    if not success then
        return false
    end

    return hasGamePass
end

Rainbow.MouseButton1Click:Connect(function()
    local player = Players.LocalPlayer


    if playerOwnsGamePass(player) then
        startRainbowEffect()
    else
 
        MarketplaceService:PromptGamePassPurchase(player, gamePassID)
    end
end)

this checks to see if they own a gamepass. if they do, it does NOT prompt to buy the gamepass. If they DON’T own the gamepass, it prompts them to buy it. How is the prompt that says I already own the gamepass happening when it’s not even supposed to prompt me?

There seems to be no such thing as Player:HasGamePassAsync. I think MarketplaceService:UserOwnsGamePassAsync is the function you have to use.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.