I have noticed that when a Guest is in my game the script awarding playerpoints will freeze because the GuestID has an id<=0 ....how can I resolve this? Do I add some exception for Guests somewhere? This should be built in by Roblox.
This is what my code looks like
local PointsService = game:GetService("PointsService")
local universeBalance = PointsService:GetGamePointBalance(randomplayer.userId)
PointsService:AwardPoints(randomplayer.userId, 10)

1 comment
It's not bad to exclude the guest, since they can not keep their PlayerPoints. Just create a random number ABOVE 0, So code should look something like this, if randomplayer.userId > 0 then -- award code.