Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

[SOLVED] How could I check if a player owns a gamepass?

Asked by 4 years ago
Edited 4 years ago
game:GetService("Players").PlayerAdded:Connect(function(player)

    if game:GetService("MarketplaceService"):UserOwnsGamePassAsync(player.UserId, 12134063) then
        print("This player has the gamepass!")
        GamepassOwned = true
    else
        print("This player doesn't have the gamepass!")
    end

end)

I want to check if a player owns a gamepass for a music changer. The script I put is only the gamepass script. I'm not getting any errors but it won't work. I've been looking at other gamepass check scripts and they look the same.

0
It works for me. rabbi99 714 — 4y
0
as your question is solved can you tell me how? Shounak123 461 — 4y

1 answer

Log in to vote
0
Answered by 4 years ago

try using a localscript for this script

0
I did, didn't work. DR_Guesty 55 — 4y
Ad

Answer this question