So I am making a game in which there is a leaderboard. There is a leaderstat in it which relies on the PlayerPoints service. However, I am getting an error message in the output when I play the game. Here is what it says:

18:00:54.919 - PointsService requires beta access

And here is the script adding the leaderstat:

function PlayerAdded(plr)
 local ls = Instance.new('Folder', plr)
 ls.Name = 'leaderstats'
 
local newPoint = Instance.new('IntValue', ls)
newPoint.Name = 'Points'
local PS = game:GetService('PointsService')
local pB = PS:GetGamePointBalance(plr.userId)
newPoint.Value = pB
end

game.Players.PlayerAdded:connect(PlayerAdded)

I used an admin command to give me 5 points, and the leaderboard still turned out as zero. I also even edited the script to test it out like so:

function PlayerAdded(plr)
 local ls = Instance.new('Folder', plr)
 ls.Name = 'leaderstats'
 
local newPoint = Instance.new('IntValue', ls)
newPoint.Name = 'Points'
local PS = game:GetService('PointsService')
local pB = PS:GetGamePointBalance(plr.userId)
newPoint.Value = pB
PS:AwardPoints(plr.userId, 1)
end

game.Players.PlayerAdded:connect(PlayerAdded)

And it still didn't add it! What am I supposed to do? I am a noob at scripting, please help!

1 comment

0

This error is thrown when trying to access PointsService in Studio, it only works in play mode