Leaderstat Service/Category

Recently I had a pretty good thought. You know when you make a new leaderstat; lets say for example Cash. It usually goes into the player and into a folder called leaderstats.

Now imagine if instead Roblox had an entirely new category called Leaderstats (E.x. Team, ReplicatedStorage, etc.)

Every player with their respective leaderstats would go into this catergory, making it easy for the Server to check what a player has, how much of it, etc. Instead of constantly going to the player and finding the value.

This could be a good or bad idea depending on how you view it, but for me this would make everything a bit simpler.

Anywho, hope you’re all having a splended day! :slightly_smiling_face:

1 Like

If I’m understanding you correctly, you want an easy method to get ALL leaderstats in a game? If so, CollectionService is your friend

Just add a tag to each leaderstats folder you make and then you can use the CollectionService:GetTagged()

Also I am curious, what problem do you have that is made simpler using an approach like this? If you already have a player, checking a given value (like cash) is pretty straightforward, no?

local cash = player.leaderstats.Cash.Value