Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

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

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

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.

This discussion is preserved as it was. New answers, comments, and votes are closed.