PointsService
This service controls the points award system used to showcase a player's achievements and participation throughout Roblox.
Memory category | Instances |
---|
Member index 5
Description
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.
History 22
- 462 Change ThreadSafety of PointsAwarded from to Unsafe
- 462 Change ThreadSafety of GetPointBalance from to Unsafe
- 462 Change ThreadSafety of GetGamePointBalance from to Unsafe
- 462 Change ThreadSafety of GetAwardablePoints from to Unsafe
- 462 Change ThreadSafety of AwardPoints from to Unsafe
- 359 Change Tags of GetGamePointBalance from [Yields] to [Yields, Deprecated]
- 359 Change Tags of AwardPoints from [Yields] to [Yields, Deprecated]
- 359 Change Tags of PointsService from [NotCreatable, Service] to [NotCreatable, Service, Deprecated]
- 325 Change Parameters of PointsAwarded from (userId: int, pointsAwarded: int, userBalanceInGame: int, userTotalBalance: int) to (userId: int64, pointsAwarded: int, userBalanceInGame: int, userTotalBalance: int)
- 325 Change Parameters of AwardPoints from (userId: int, amount: int) to (userId: int64, amount: int)
- 322 Change Parameters of GetPointBalance from (userId: int) to (userId: int64)
- 322 Change Parameters of GetGamePointBalance from (userId: int) to (userId: int64)
- 208 Change Tags of GetPointBalance from [Yields] to [Yields, Deprecated]
- 208 Change Tags of GetAwardablePoints from [] to [Deprecated]
- 172 Change Tags of GetAwardablePoints from [Yields] to []
- 147 Change Parameters of PointsAwarded from (userId: int, userBalanceInGame: int, userTotalBalance: int) to (userId: int, pointsAwarded: int, userBalanceInGame: int, userTotalBalance: int)
- 143 Add PointsAwarded
- 143 Add GetPointBalance
- 143 Add GetGamePointBalance
- 143 Add GetAwardablePoints
- 143 Add AwardPoints
- 143 Add PointsService
Members 5
AwardPoints
Parameters (2) | ||
---|---|---|
userId | int64 | |
amount | int | |
Returns (1) | ||
Tuple |
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.
1 2 |
|
Thread safety | Unsafe |
---|
History 4
- 462 Change ThreadSafety of AwardPoints from to Unsafe
- 359 Change Tags of AwardPoints from [Yields] to [Yields, Deprecated]
- 325 Change Parameters of AwardPoints from (userId: int, amount: int) to (userId: int64, amount: int)
- 143 Add AwardPoints
GetAwardablePoints
Parameters (0) | ||
---|---|---|
No parameters. | ||
Returns (1) | ||
int |
This function returns the number of points the current game has available to award to players.
Thread safety | Unsafe |
---|
History 4
- 462 Change ThreadSafety of GetAwardablePoints from to Unsafe
- 208 Change Tags of GetAwardablePoints from [] to [Deprecated]
- 172 Change Tags of GetAwardablePoints from [Yields] to []
- 143 Add GetAwardablePoints
GetGamePointBalance
Parameters (1) | ||
---|---|---|
userId | int64 | |
Returns (1) | ||
int |
This function returns the total number of points a player has in the current game.
Thread safety | Unsafe |
---|
History 4
- 462 Change ThreadSafety of GetGamePointBalance from to Unsafe
- 359 Change Tags of GetGamePointBalance from [Yields] to [Yields, Deprecated]
- 322 Change Parameters of GetGamePointBalance from (userId: int) to (userId: int64)
- 143 Add GetGamePointBalance
GetPointBalance
Parameters (1) | ||
---|---|---|
userId | int64 | |
Returns (1) | ||
int |
This function returns the total number of points the given player has across all games.
Thread safety | Unsafe |
---|
History 4
- 462 Change ThreadSafety of GetPointBalance from to Unsafe
- 322 Change Parameters of GetPointBalance from (userId: int) to (userId: int64)
- 208 Change Tags of GetPointBalance from [Yields] to [Yields, Deprecated]
- 143 Add GetPointBalance
PointsAwarded
Parameters (4) | |
---|---|
userId | int64 |
pointsAwarded | int |
userBalanceInGame | int |
userTotalBalance | int |
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.
1 2 3 4 5 |
|
Thread safety | Unsafe |
---|
History 4
- 462 Change ThreadSafety of PointsAwarded from to Unsafe
- 325 Change Parameters of PointsAwarded from (userId: int, pointsAwarded: int, userBalanceInGame: int, userTotalBalance: int) to (userId: int64, pointsAwarded: int, userBalanceInGame: int, userTotalBalance: int)
- 147 Change Parameters of PointsAwarded from (userId: int, userBalanceInGame: int, userTotalBalance: int) to (userId: int, pointsAwarded: int, userBalanceInGame: int, userTotalBalance: int)
- 143 Add PointsAwarded