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

Player Points not reflecting current amount on the leaderboard?

I'm trying to make the player's current amount of Points show on the leaderboard. I've tried using GetGamePointBalance with the player's userId, but it wouldn't work.

game.Players.PlayerAdded:connect(function(player)
local leaderstats = Instance.new("Model")
	leaderstats.Name = "leaderstats"
	leaderstats.Parent = player
local points = Instance.new("IntValue")
	points.Name = "Points"
	points.Parent = leaderstats
	points.Value = game.Players:GetGamePointBalance(player.userId)
end)

1 answer

I think you just threw the function in the wrong place.

game.Players.PlayerAdded:connect(function(player)
local leaderstats = Instance.new("Model")
    leaderstats.Name = "leaderstats"
    leaderstats.Parent = player
local points = Instance.new("IntValue")
    points.Name = "Points"
    points.Parent = leaderstats
    points.Value = game:GetService("PointsService"):GetGamePointBalance(player.userId)
end)

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