Answered by
7 years ago Edited 7 years ago
I was planning on just commenting on the other two answers to help you but it’s a little hard to explain with comments, so I’m going to explain what both those guys are trying to say by an answer.
GingeyLol is trying to say you should put, or parent, the value(s) in leaderstats into the player itself. It’d be something like :
game.Players.LocalPlayer.leaderstats.Points
into
game.Players.LocalPlayer.Points
See the difference? The Points value is not in the leaderstats anymore, but in the player itself.
Now, what CrastificeDude612 is trying to say. He’s saying you should make a folder and name it “hidden”. Then put it in leaderstats to store unused values. Apparently you don’t know how to make and put a folder into leaderstats so here’s an example :
1 | local hidden = Instance.new(‘Folder’) |
3 | hidden.Parent = game.Players.LocalPlayer.leaderstats |
This script creates a folder, names it “hidden”, then parents it to leaderstats. Also if you’re using a server (regular) script, you’ll have to change LocalPlayer into a specific player (Ex : A player’s username), as LocalPlayer doesn’t work in server scripts.
Oh, and one more thing. If you’re going to hide a value in one player, you must do it in ALL players, as doing it in one only messes up the leaderstats. You can use a for loop to get all the players and hide the values.
Hope I explained everything clearly. If this answer helped and you want to accept it, please at least upvote the other two answers as they are good solutions to answer your problem. All I did was explain them. If you have any questions, comment it in my answer and I’ll get back to you.