Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Most secure way to create player stats?

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?

2 comments

0

Save them on the server and just have the Client request the info?

0

Show me examples do I look like I know what you're talking about with my bacon hair lol

1 answer

✓ Accepted 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

0

How would I reference the folder in other scripts? game.ServerStorage.PlayersStats.player.Name?

0

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.