So im making a double coins gamepass
And i cant find any scripts of checking if a player has a gamepass that works
Can anyone help me?
So im making a double coins gamepass
And i cant find any scripts of checking if a player has a gamepass that works
Can anyone help me?
local MPS= game:GetService("MarketplaceService")
local passid = 0 -- gamepass id
game.Players.PlayerAdded:Connect(function(plr)
if MPS:UserOwnsGamePassAsync(plr.UserId, passid) then
-- do stuff
end
end)
here
will plr.UserId work or do i need to define it in a local? (like local plr =)
the player who joined is passed inside the .PlayerAdded event. So yes, it will work.
Oh i didnt see that, thanks!
[characterlimit]