Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Is This Player Point Script Correct?

It Wouldn't Work During Game So I'm Guessing There Is Something Wrong With It

PointsService = game:GetService "PointsService"
game.Players.PlayerAdded:connect(function(p)	
while true do
wait(60)
game:GetService("PointsService"):AwardPoints(p.userId,1)
print("1 Player Point Awarded")
end
end)

2 answers

✓ Accepted answer

Remove the first line, it's pointless (pun unintended) and also add an 'if' statement like this:

game.Players.PlayerAdded:connect(function(plr)
while true do
wait(60)
local serv=game:GetService("PointsService")
if serv:GetAwardablePoints()>0 then
serv:AwardPoints(plr.userId,1)
end
end
end)

This answer is brought to you buy Chipio Industries

Kinda wondering why you declared a variable for the points service up top and then didn't use it because you ended up getting the service again anyway but you might be getting an error on that top line because you don't have parenthesis to enclose the argument "PointsService"

This discussion is preserved as it was. New answers, comments, and votes are closed.