I want to make a SurfaceGui leaderboard that would display all the players who own one of the gamepasses in my game, how would I do that? I already have a SurfaceGui, I just don’t know how to script it properly. I tried looking on the DevForum but didn’t find anything.
I don’t think there’s a way to get all players who own a game pass, only ways to check if a specific player owns it.
You could store all the players who purchase it into a data store and keep track of it that way. For players who’ve purchased the pass beforehand, just add a check on a PlayerAdded event - if they did purchase it in the past, add them to the same data store.
For everyone who purchased it beforehand, but doesn’t rejoin the game, they won’t care if their name isn’t listed since they aren’t playing the game.
You should just keep a datastore. Whenever a player joins the game, check if they own the gamepass. If they do, check if they’re in the datastore. If not, add them to it.
Then just show the datastore’s entries on the leaderboard.
just realized you answered the same thing, making mine a waste of time
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.