Update the UserOwnsGamePassAsync cached value when PromptGamePassPurchaseFinished fires

Since UserOwnsGamePassAsync caches, it only ever needs to be called once per-gamepass per-player per-server. Calling it more than once would be redundant because you already know what the result is going to be. If the result is false and PromptGamePassPurchaseFinished fires, you can update the result to true yourself because you can detect that the gamepass was bought (unless it was bought from the website.) Roblox should just update the cached value of UserOwnsGamePassAsync to true when PromptGamePassPurchaseFinished fires instead of making it necessary for developers to manually keep track of whether the gamepass is owned. The same applies to badges and other cached values where events provide sufficient information to manually update the cache.

34 Likes

This needs to be implemented, currently the only valid way to validate gamepass purchases is by having players rejoin.

  • The wasPurchased argument in PromptGamePassPurchaseFinished is unreliable as it can be sent as true.
  • Roblox Recommends to use UserOwnsGamePassAsync but the problem is it’s cached since the player joins, so it would return false instead of true if the player just bought the gamepass.
  • So when checking UserOwnsGamePassAsync it would be better if it had a no cache option like GetAsync that returns the latest gamepass state.
3 Likes

roblox please implement this, it would be highly beneficial

1 Like