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"
local kills = Instance.new("NumberValue",leaderstats)
kills.Name = "Kills"
kills.Value = 0
local Deaths = Instance.new("NumberValue",leaderstats)
Deaths.Name = "Deaths"w
Deaths.Value = 0
player.CharacterAdded:Connect(function(character)
local humanoid = character:FindFirstChild("Humanoid")
humanoid.Died:Connect(function()
Deaths.Value = Deaths.Value + 1
local tag = humanoid:FindFirstChild("creator")
local killer = tag.Value
if tag and killer then
local hum = game.Players:FindFirstChild("humanoid")
killer.leaderstats.Kills.Value = killer.leaderstats.Kills.Value + 1
end
end)
end)
end
game.Players.PlayerAdded:Connect(playerJoined)

7 comments
I need to go soon.
i think theres a leaderboard feature for mobile or for my device
in mobile
not very sure how tho because i didnt make it work and its pretty advanced
How about checking if the player touched the screen? Genius-
you are genius
ok, I figured out the mobile thing. How do I get the leaderboard values and change the text label to that number?