Games have tons of storage places, like server storage, replicated storage, etc, but I am confused about where to store information local to one player, like experience points and rank. I tried using a folder in the backpack, a folder in starter player scripts, and am thinking about using starter GUI. I am just wondering if there is a place you are supposed to put stuff like that, and if there isn't, how other developers do it. Thanks.
As you said there are useful places like ServerStorage
and ReplicatedStorage
. Unless you need to access the data from the client, I would keep it in ServerStorage
. Otherwise, I would use ReplicatedStorage
. I would not recommend places like the Workspace
or Lighting
because those each have purposes completely different than that of storing data. The Workspace
is for things interacting with the player and the main functions of the 3d world and Lighting
is for lighting and lighting effects(as its name clearly states). Finally, I ask that you use :GetService()
when accessing a service like ServerStorage
or ReplicatedStorage
. The reasons are laid out very well in this answer
by M39a9am3R. Use :GetService()
especially if you are using a LocalScript
because hackers can change the names of services on the client and break your LocalScripts
. I hope this helps and have a great day scripting!