How do I change Leaderboard values to gui for mobile users?
For example somebody on the Leaderboard has 43 kills but they can't see it because they are mobile. So I want to know how to make a gui that shows their kills that gets information from the Leaderboard values. Please explain where to put things as I'm a little new to scripting like this.
This is the Leaderstats script, it's in SeverScriptService:
function playerJoined(player)
local leaderstats = Instance.new("Folder", player)
leaderstats.Name = "leaderstats"
01 | local kills = Instance.new( "NumberValue" ,leaderstats) |
05 | local Deaths = Instance.new( "NumberValue" ,leaderstats) |
06 | Deaths.Name = "Deaths" w |
09 | player.CharacterAdded:Connect( function (character) |
10 | local humanoid = character:FindFirstChild( "Humanoid" ) |
11 | humanoid.Died:Connect( function () |
12 | Deaths.Value = Deaths.Value + 1 |
15 | local tag = humanoid:FindFirstChild( "creator" ) |
16 | local killer = tag.Value |
17 | if tag and killer then |
18 | local hum = game.Players:FindFirstChild( "humanoid" ) |
19 | killer.leaderstats.Kills.Value = killer.leaderstats.Kills.Value + 1 |
end
game.Players.PlayerAdded:Connect(playerJoined)