Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How to check if a player has a gamepass?

I have this script that is supposed to check if player has a game pass, but it doesn't work. Any ideas why?

game.Players.PlayerAdded:connect(function(plr)
	wait(3)
	if game:GetService("MarketplaceService"):UserOwnsGamePassAsync(plr.UserId, 7033725) then
		print(plr.Name.." has VIP")
	end
end)

1 comment

0

this should work, make sure the script is enabled and that u dont have a loop in the same script

2 answers

✓ Accepted answer

That is correct, or it may not be, try a few of these things and tell me if they work:

  1. Invert User ID and Gamepass ID
  2. Make sure there is no loop occurring before this function
  3. Make sure API access is enabled in roblox studio or else this may not work
  4. Make sure that you have the right gamepass there

1 comment

0

Looks like I forgot to enable API access, thanks!

This discussion is preserved as it was. New answers, comments, and votes are closed.