Is there still any way to use :GetPointBalance()? I want to create a quick project before the PointsService retires but I need this function to work. Currently it only returns 0
We will always remember this future back when points were supported.
Fly high. PointsService.
You will be missed PointsService
No, itās an artifact from back when points were a cross-game concept, with each game having a limited amount of points to award.
Just wanted to add that it really wouldnāt be hard to make a direct copy of pointsservice in the first place, all you need to do is fire the notification API with the same image and text.
I was thinking of emulating the old PlayerPoints popup with StarterGui:SetCore(). But I canāt find the red Player Points star icon in the game files, anyone know where to find it in the texture files?
I believe he is making a joke, but I am not sure.
From checking the 2014-2017 clients and the 2013 RCC files, I cannot find it. Perhaps it is an online asset.
is this a save thing or what? man i should learn some code things
itās an uploaded asset: rbxassetid://206410433
it was a per game and full platform leaderboard system, game owners could call it to then give a user points to be displayed on both, they were a way of showing how much you played and how good you are at that game.
but the devs wont be able to have a custom leaderboard page on their games, or let users show off their points in diff games. like i said, so many ideas, that roblox decided to throw away
Though it is nostalgic Iām glad Roblox is continuing to take steps to improve the platform. I think finally sunsetting PointsService was the right call due to the alternatives available now. Iām glad that Roblox staff are offering easy ways to try and retain functionality for legacy code bases and offering data transfer. This is exactly how feature sunsets should work!
To the 7 people who got mad at this person for saying this, I hope you now realize that this is satire. Itās a bait comment, and you guys fell for it.
I use PointsService for my game, but it wonāt be hard to migrate. Thanks for providing a module for us! Thatās very considerate.
I feel like this is a good idea, PointsService
is deprecated, and I want to make roblox games future proof, and Iām helping to achieve that by making a plugin
the module you provided is better if itās like this,
-- change the datastore name as desired
local datastoreName = "_rbx_UserPoints"
local pointsAwarded = Instance.new("BindableEvent")
local ds = game:GetService("DataStoreService"):GetOrderedDataStore(datastoreName)
local ps = game:GetService("PointsService")
local PointsServiceWrapper = {}
function PointsServiceWrapper:AwardPoints(userId: number, amount: number)
if userId <= 0 then
error('User id must be positive')
end
if amount <= 0 then
error('Point amount must be positive')
end
-- optimistically assume that the user has already been migrated
local finalPoints = ds:UpdateAsync(userId, function (currentPoints: number?): number?
if not currentPoints then
-- oops, not actually migrated
return nil
end
return currentPoints + amount
end)
if not finalPoints then
-- this user has not been migrated, migrate it now
local legacyPoints = ps:GetGamePointBalance(userId)
finalPoints = ds:UpdateAsync(userId, function (currentPoints: number?): number
if not currentPoints then
-- still not migrated, add point amount from the legacy system
-- to the amount of points awarded
return legacyPoints + amount
else
-- the user must have been migrated from another instance;
-- disregard legacy points and proceed as usual
return currentPoints + amount
end
end)
end
if finalPoints then
pointsAwarded:Fire(userId, amount, finalPoints, finalPoints)
end
end
function PointsServiceWrapper:GetGamePointBalance(userId: number): number
if userId <= 0 then
error('User id must be positive')
end
-- optimistically assume the user has been migrated
local points = ds:GetAsync(userId)
if not points then
-- user not migrated yet, query legacy system
points = ps:GetGamePointBalance(userId)
end
return points
end
function PointsServiceWrapper:GetPointBalance(userId: number): number
return 0
end
function PointsServiceWrapper:GetAwardablePoints(): number
return 2^31 - 1
end
PointsServiceWrapper.PointsAwarded = pointsAwarded.Event
return PointsServiceWrapper
though you might have to fill the form in qualtrics in order to get your experience to migrate data, I donāt feel interested to use the qualtrics surveies, as it first asks for my age, and I donāt like sharing my age
As silly as it sounds, PointsService actually taught me the value of refactoring code (or, at least, the find and replace feature) - I had added it in as an extra thing (for the leaderboards feature) of several existing games of mine from 2013-2015 that all happened to have āPointsā as the name of the in-game currency, and the ensuing player confusion lead to me renaming said currency to āMoneyā wherever I couldā¦ I guess with the API being retired I could change it back, but at this point thereās bigger issues regarding functionality of games that old anyways.
If anyone wants to see the player points in use, hereās a game that still uses it:
I feel like this update shouldnāt be rolled out to certain games that havenāt been updated within a certain period of time to prevent old games that donāt receive updates anymore relying on this functionality from breaking.
Itās already likely that those kind of games are broken from previous updates
Do I have to fill out a form for every game that I need PointsService for?