Is there a way I can make custom leader stats that display ranks? I want to be able to set the persons rank not in a group (because I do not own one) and then it to show up in the leaderboard
Yes. The requirement for using the default leaderboard GUI is that you insert an object of any class (a Folder
is best) named exactly (case-sensitive) "leaderstats".
After that, simply create and set value objects (anything inheriting from ValueBase
) into the leaderstats
.
For example:
game.Players.PlayerAdded:Connect(function(Player) local Leaderstats = Instance.new("Folder") local Rank = Instance.new("StringValue") Rank.Value = "General" Rank.Parent = Leaderstats Leaderstats.Parent = Player end)
I managed to do it with this:
game.Players.PlayerAdded:Connect(function(plr) local stats = Instance.new("Model",plr) stats.Parent = game.Players.LocalPlayer stats.Name = "leaderstats" local rank = Instance.new("StringValue",stats) rank.Name = "Rank" local drank = Instance.new("StringValue",stats) drank.Name = "Divisional Rank" if game.Players.LocalPlayer.Name == "tictac67" then game.Players.LocalPlayer.leaderstats.Rank.Value = "Overseer" end if game.Players.LocalPlayer.Name == "tolly67p" then game.Players.LocalPlayer.leaderstats.Rank.Value = "O5-2" end if game.Players.LocalPlayer.Name == "MINECRAFT_LOLBUILDZ" then game.Players.LocalPlayer.leaderstats.Rank.Value = "Site Director" end if game.Players.LocalPlayer.Name == "BrigamerGT" then game.Players.LocalPlayer.leaderstats.Rank.Value = "O5-X" end end)