Roblox UtilitiesDevlHub Roblox Documentation

Class

PointsService

NotCreatableServiceDeprecated
Inherits
Instance › Object
Memory category
Instances

This service controls the points award system used to showcase a player's achievements and participation throughout Roblox.

Deprecated. This class was once used to control an ancient achievement system since removed and deprecated. It and its members should not be used in new work.

The PointsService class controls points.

Points are an award system used to showcase a player's achievements and participation throughout Roblox. How points are awarded through this service is at the discretion of the game's developer.

Methods 4#

AwardPointsAttempts to award the user with the specified Player.UserId the specified number of points.DeprecatedYields
GetAwardablePointsReturns the number of points the current game has available to award to players.Deprecated
GetGamePointBalanceReturns the total number of points a player has in the current game.DeprecatedYields
GetPointBalanceReturns the total number of points the given player has across all games.DeprecatedYields

AwardPoints(userId: int64, amount: int): Tuple#

YieldsDeprecatedDeprecated

Deprecated. This function was once part of the PointService class used to control an ancient achievement system since removed and deprecated. It should not be used in new work.

This function attempts to award the user with the specified Player.UserId the specified number of points.

If successful, this function will return the UserId of the user the points were awarded to, the number of points awarded, the new total number of points the user has in the game and another value which appears to always be 0.

This function will cause an error if the specified UserId is not positive or if the number of points specified is 0.

The function can be used to award a negative number of points to a user however.

NameTypeDefaultDescription
userIdint64
amountint
Returns
  • Tuple

GetAwardablePoints(): int#

DeprecatedDeprecated

Deprecated. This function was once part of the PointService class used to control an ancient achievement system since removed and deprecated. It should not be used in new work.

This function returns the number of points the current game has available to award to players.

Returns
  • int

GetGamePointBalance(userId: int64): int#

YieldsDeprecatedDeprecated

Deprecated. This function was once part of the PointService class used to control an ancient achievement system since removed and deprecated. It should not be used in new work.

This function returns the total number of points a player has in the current game.

NameTypeDefaultDescription
userIdint64
Returns
  • int

GetPointBalance(userId: int64): int#

YieldsDeprecatedDeprecated

Deprecated. This function was once part of the PointService class used to control an ancient achievement system since removed and deprecated. It should not be used in new work.

This function returns the total number of points the given player has across all games.

NameTypeDefaultDescription
userIdint64
Returns
  • int

Events 1#

PointsAwardedFires when points have been successfully awarded to a player, while also passing along the updated balance of points the player has in the current game and all games.Deprecated

PointsAwarded(userId: int64, pointsAwarded: int, userBalanceInGame: int, userTotalBalance: int)#

Deprecated

Deprecated. This function was once part of the PointService class used to control an ancient achievement system since removed and deprecated. It should not be used in new work.

This event fires when points have been successfully awarded to a player, while also passing along the updated balance of points the player has in the current game and all games.

When a player is awarded points successfully the below example would print the userId and their new point balance. If, for example, the Roblox account was awarded thirty points (and had none to begin with)

User: 1 has now earned 30 (+30) points in the current game, now making their total balance

would be printed.

NameTypeDefaultDescription
userIdint64
pointsAwardedint
userBalanceInGameint
userTotalBalanceint

Inherited members#

Inherited from Instance 58
Inherited from Object 6
Properties (2)

ClassName, className

Events (1)

Changed