PcoWSkbVqDnWTu_dm2ix
Collapse Sidebar

PlayerMembershipChanged

This event fires when the game server recognizes that a player’s membership has changed. Note, however, that the server will only attempt to check and update the membership after the Premium modal has been closed. Thus, to account for cases where the user purchases Premium outside of the game while playing, you must still prompt them to purchase Premium; this will then show a message telling them they’re already upgraded and, once they close the modal, the game server will update their membership and trigger this event.

To learn more about and incorporating Premium into your game, and monetizing your game with the Premium Payouts system, take a look at this article.

See also

  • MarketplaceService/PromptPremiumPurchase, used to prompt a user to purchase Premium
  • MarketplaceService/PromptPremiumPurchaseFinished, fires when the Premium purchase UI closes

Parameters

Name Type Default Description

Code Samples


Handling Premium Membership Changes

The function in the code sample runs after the game server confirms a player’s membership has changed. It demonstrates how you can grant players access to Premium benefits (or revoke them) when their membership status changes.