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

How to make a leaderboard stat appear on a textlabel that is in the workspace (not gui)?

Asked by 2 years ago

i have tried to use this localscript from tutorials:

redvalue = script.Parent

game.Players.PlayerAdded:Connect(function(player) redvalue.Text = tostring(player.leaderstats.RedPoints.Value)

    wait(0.5)

end)

again, not gui.

1 answer

Log in to vote
0
Answered by
xXMadonXx 190
2 years ago

You are not creating a leaderstat when the player joins. Do that first as otherwise the code throws an error because you are trying to reference nil.

Ad

Answer this question