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

a couple of things are not working with my leaderboard please help me?

Asked by 3 years ago

Im currently trying to make a basic leaderboard that displays name, kills and deaths. the text there is controlled by the leaderstats values but it worked for a little bit but now it keeps giving me and error that says, leaderstats is not part of the player but when i go check in the explorer tab i have the leaderstats loaded into the player.

Another issue is i want the text to update with the amounts of deaths or kills but the way i do it, im not sure how to have it update. Can you please help me out with this -TeaWithMee

Leaderboard code

game.Players.PlayerAdded:Connect(function(plr)
    plr.CharacterAdded:Connect(function(char)
        local clone = game.StarterGui.LeaderBoard.RedList.Listin:Clone()
        local parent = game.StarterGui.LeaderBoard.RedList
        clone.Parent = parent
        clone.PlrName.Text = plr.Name
        clone.Kills.Text = plr.leaderstats.Kills.Value
    clone.Deaths.Text = plr.leaderstats.Deaths.Value
    end)
end)
0
can you show code that creates the leaderstats? imKirda 4491 — 3y
0
Why don't you just add this part to the code that creates your leaderstats? When the player joins the game set the values of your leaderboard in the same part. l_diue 30 — 3y

1 answer

Log in to vote
0
Answered by 3 years ago

Look at this video

https://www.youtube.com/watch?v=HU_p1J5UvjU

0
I already have a leaderstat script, im trying to take the values of the kills and deaths in the leaderstats and translate it into a text which will make a whole other leaderboard TeaWithMee 76 — 3y
Ad

Answer this question