I've been trying to script a points script that will act as an "Elo rating", but nothing's working at the moment.

local points = game:GetService("PointsService")

game.Players.PlayerAdded:connect(function(player)
	local leaderstats = Instance.new("Model")
	leaderstats.Name = "leaderstats"
	leaderstats.Parent = player
	
	local pointers = points:GetGamePointBalance(player.userId)
	if (pointers == 0) then
		pointers = 1500
		points:AwardPoints(player.userId, pointers)
		
	local pointsystem = Instance.new("IntValue")
	pointsystem.Name = "Rating"
	pointsystem.Value = pointers
	pointsystem.Parent = leaderstats
	end
end)

4 comments

0

Apparently, the leaderboard works when I remove line 11, but it won't award the starting points.

0

PointsService:GetUserPointBalanceInUniverse failed because userId <= 0, please supply a positive userId. 07:33:28.234 - Script 'Workspace.Script', Line 8 07:33:28.234 - Stack End Maybe your just working out in Studio? Tried online?

0

Yes, that is sometimes the problem.

0

Thanks, it works live.