After a player buys a gamepass, the data is saved.
Should the server check if the player owns a gamepass via the DataStore or with the inbuilt roblox function?
After a player buys a gamepass, the data is saved.
Should the server check if the player owns a gamepass via the DataStore or with the inbuilt roblox function?
I’d check the datastore first and if it comes up as false, you can check the if the player owns the gamepass with the API. This is most effective if you plan on manually giving players access to gamepass-locked perks
(I’m assuming you mean Datastore as in a datastore you’re making and writing info into yourself. Correct me if I’m wrong.)
I would recommend using the “UserOwnsGamePassAsync” function.
– UserOwnsGamePassAsync –
Pros:
Cons:
– Datastore –
Pros:
Cons:
It also just depends on your use case.
(there are more pros and cons for both but idk anymore of the top of my head)
always use UserOwnsGamePassAsync, adding onto the reasons stated above:
dont do this, this would just add another api call for players who dont own your gamepass for no reason
if you need to save custom info about the gamepass (like when they bought it), get the players data AFTER checking if they own it. if they have the gamepass but no data was found, save the latest / “default” data.
Yeah my thought process was very similar. Players can delete their own gamepass. Also roblox is way more reliable too.
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.