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

How would I make a custom leaderboard/healthbar etc?

I know how to take away the core guis, but how would I make a custom leaderboard or healthbar.

1 answer

  1. To make a leaderboard, you will have to start by inserting an object named 'leaderstats' into each player:
game.Players.PlayerAdded:connect(function(player) --We create a function that will execute when PlayerAdded fires.
     local leaderstats = Instance.new("Model", player) --We insert an Model into the the new player (player)
     leaderstats.Name = "leaderstats"
 end) --closes function
  1. Now, we will add the different values, such as the Money, KO's, and Wipeouts, to the leaderstats container. In this tutorial, we will only have a Money section. To do this, all you have to do is add an 'IntValue' object as a child of the 'leaderstats' container.
game.Players.PlayerAdded:connect(function(player)
     local leaderstats = Instance.new("Model", player)
     leaderstats.Name = "leaderstats"
 
     local money = Instance.new("IntValue", leaderstats) --We instance a new IntValue as a child of 'leaderstats'
     money.Name = "Money" --this is the name you want the leader-stat to be when it shows up in-game.
     money.Value = 0 --this is the value of money the new player starts out with. To change this, you can add some more code (shown later)
 end)

2 comments

0

I think he ment re-creating a core gui leaderboard. Not the leaderstats. But good answer none the less :P

0

Yeah, I meant making my own leaderboard. That isn't working :P

This discussion is preserved as it was. New answers, comments, and votes are closed.