Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Is it possible to hide Specific stats in a Leaderboard?

Asked by 6 years ago

HI! I'm making a game that contains a leaderboard with cash, levels,exp, and etc. All those stats take up the leaderboard and can make it take up the screen if there is a great number of people. My question is that is it possible to hide specific stats on the leaderboard instead of hiding the whole board. Example, I want to hide the exp and money in the leaderboard while keeping the levels stats visible. if you need me to explain more in dept, let me know. Thanks for your assistance.

4 answers

Log in to vote
0
Answered by 6 years ago
Edited 6 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 :

local hidden = Instance.new(‘Folder’)
hidden.Name = ‘hidden’
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.

0
Im Kinda Understanding your answer but to confirm, can you try to put it all together 1freshkidz1 12 — 6y
0
What do you mean put it all together? You mean the scripts? I don’t know how your script works and it’s hard to make a full script on mobile. You’ll have to wait if you want a full script. User#20279 0 — 6y
0
OK I got it, im kinda new to this site so i have no idea on how to accept answers 1freshkidz1 12 — 6y
0
and im going to show you my leaderboard script so you have an idea 1freshkidz1 12 — 6y
Ad
Log in to vote
0
Answered by
GingeyLol 338 Moderation Voter
6 years ago
Edited 6 years ago

Yes. Don't put the object/value directly under the object named "Leaderstats" but instead put the object/value directly as a child of the player.

0
Okay can you explain that a little bit more to me please 1freshkidz1 12 — 6y
Log in to vote
0
Answered by 6 years ago
Edited 6 years ago

Put another folder in the Leaderstats and call that "hidden". Values that go in that folder called 'hidden' will be hidden while others will be shown. That is all I can explain to you.

0
Okay, how am i supposed to put a folder in the leaderstats. My leaderboard is created by a script so how am i supposed to insert a folder in it? 1freshkidz1 12 — 6y
Log in to vote
0
Answered by 6 years ago
Edited 6 years ago

For @Denny9876 Here is The Script.

function onPlayerEnter(player)

game.Players.LocalPlayer.Points

local board = Instance.new("BoolValue", player)
board.Name = "leaderstats"

local gold = Instance.new("IntValue", board)
gold.Name = "Test1" 
gold.Value = 1000 

local gold = Instance.new("IntValue", board)
gold.Name = "Test2"
gold.Value = 1  
end             

game.Players.ChildAdded:connect(onPlayerEnter)

What needs to change or needs to be added?

0
You can copy my folder script and put it into your function while making some changes to my script to fit your script. I can’t help any further though for today. Sorry. User#20279 0 — 6y
0
Okay that's acceptable, Thank you so much your help. Also how do i accept answers?sorry i'm new to this 1freshkidz1 12 — 6y

Answer this question