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

How to make a Efficient Gamepass Script?

Asked by
Vezious 310 Moderation Voter
8 years ago

I know how to make a script for if a player has a gamepass, but The problem is, if the player joins the server then buys the gamepass from the webpage, and the script checks for the gamepass when you join the server, and they rejoin but still says they don't have it, how do you fix that? Sorry if you don't understand.

0
Just check more often than that? BlueTaslem 18071 — 8y

1 answer

Log in to vote
1
Answered by
DataStore 530 Moderation Voter
8 years ago

I'm assuming you're using PlayerHasPass. The issue with this is the fact that the method caches, which leads to what you've described - In terms of, if they leave and come back or if you're checking multiple times whilst they're ingame. The best way around this is using MarketplaceService's PlayerOwnsAssets method.

Ad

Answer this question