People say leaderstats is easy to hack. What is the most secure way to create player stats and make the client unable to modify it?
Most secure way to create player stats?
1 answer
You could create a folder in ServerStorage, holding all the data of each client. Let's say there's a folder in ServerStorage called 'PlayerData', when a player joins the game you can create a folder with all the client's data in 'PlayerData', and name it as the client's name. You could have stringvalues, intvalues, etc for the client's data, like: an intvalue showing the Money that client has. This makes it so that the client can't access the data as the descendants of ServerStorage can't be accessed by a client-sided(local) script.
If you'd like, you can get the client's data using a RemoteFunction.
2 comments
How would I reference the folder in other scripts? game.ServerStorage.PlayersStats.player.Name?
for indexing, it is required to use square paranthesis '[]', so: game.ServerStorage.PlayerStats[player.Name]
This discussion is preserved as it was. New answers, comments, and votes are closed.

2 comments
Save them on the server and just have the Client request the info?
Show me examples do I look like I know what you're talking about with my bacon hair lol