Gamepasses don´t work on local test servers

I don´t know if this intentional or something, but if I buy a gamepass on roblox studio, while being on a local test server, the purchase seems to not be working, when I try to check if I own the gamepass that I just bought, it returns false.
Does anyone have any idea why?

1 Like

You can try this for studio

local GAME_PASS_ID = 123456789 -- Replace with your actual Game Pass ID

local function hasGamePass(player)
    if game:GetService("RunService"):IsStudio() then
        return true
    else
        return game:GetService("MarketplaceService"):UserOwnsGamePassAsync(player.UserId, GAME_PASS_ID)
    end
end

game.Players.PlayerAdded:Connect(function(player)
    if hasGamePass(player) then
        print(player.Name .. " owns the game pass.")
    else
        print(player.Name .. " does not own the game pass.")
    end
end)

It gets ownership

I mean I guess that would work, but I´m currently trying to test if the shop loads correctly after buying the gamepass, is there any way to fix the core issue?