API:Class/PointsService

Note: This service will be unavailable if you enable loadstring through ServerScriptService.
Filtered-inheritance mode: While this class technically inherits all Instance class members, some (if not all) have been hidden because they serve no purpose for this object.
Service: This class is a service. It is a top-level singleton which can be obtained with the GetService method.
Uncreatable: This object cannot be created with Instance.new.

PointsIcon.pngPointsService : Object Icon.pngInstance

This service 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.

Functions

FunctionsmemberhiddenFunctions [toggle]

intGetAwardablePoints ( ) [deprecated]

Deprecated. Do not use.

|RMD member="API:Class/PointsService/GetAwardablePoints"|Deprecated. Do not use.|/RMD|
GetAwardablePoints ( ) [deprecated]
Deprecated. Do not use.

YieldFunctions

YieldFunctionsmemberhiddenYieldFunctions [toggle]

int, int, int, intAwardPoints ( int userId, int amount )

Attempts to award the user with the specified 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.

|RMD member="API:Class/PointsService/AwardPoints"|Attempts to award the user with the specified 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.|/RMD|
intGetGamePointBalance ( int userId )

Returns the total number of points a player has in the current game.

|RMD member="API:Class/PointsService/GetGamePointBalance"|Returns the total number of points a player has in the current game.|/RMD|
intGetPointBalance ( int userId ) [deprecated]

Deprecated. Do not use.

|RMD member="API:Class/PointsService/GetPointBalance"|Deprecated. Do not use.|/RMD|
AwardPoints ( int userId, int amount )
Attempts to award the user with the specified 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.
Returns the total number of points a player has in the current game.
GetPointBalance ( int userId ) [deprecated]
Deprecated. Do not use.

Events

Events [toggle]

PointsAwarded ( int userId, int pointsAwarded, int userBalanceInGame, int userTotalBalance )

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

|RMD member="API:Class/PointsService/PointsAwarded"|Fires when points have been successfully awarded to a player, whilst also passing along the updated balance of points the player has in the current game and all games.|/RMD|
PointsAwarded ( int userId, int pointsAwarded, int userBalanceInGame, int userTotalBalance )
Fires when points have been successfully awarded to a player, whilst also passing along the updated balance of points the player has in the current game and all games.

|RMD member="API:Class/PointsService"|This service 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.
|/RMD|



Tutorials Used In

Points tutorial