It won't find the AwardablePoints for some reason... Help?
local PointsService = Game:GetService("PointsService") game.Players.PlayerAdded:connect(function(player) local pointToAward = PointsService:GetAwardablePoints() local universeBalance = PointsService:GetGamePointBalance(player.userId) if ( pointsToAward > 999999 and universeBalance == 9999999999) then PointsService:AwardPoints(player.userId, 1) end end) PointsService.PointsAwarded:connect(function(userId, userBalanceinUni, userBalance) local message = Instance.new('Message', game.Workspace) message.Text = "Point awarded to " .. userId .. ". This player now has " .. userBalance .. " points total!" wait(5) message:Destroy() end)
You had "local pointToAward" but later on said "pointsToAward", so I think you missed an S in the local variable.
local PointsService = Game:GetService("PointsService") game.Players.PlayerAdded:connect(function(player) local pointsToAward = PointsService:GetAwardablePoints() local universeBalance = PointsService:GetGamePointBalance(player.userId) if ( pointsToAward > 999999 and universeBalance == 9999999999) then PointsService:AwardPoints(player.userId, 1) end end) PointsService.PointsAwarded:connect(function(userId, userBalanceinUni, userBalance) local message = Instance.new('Message', game.Workspace) message.Text = "Point awarded to " .. userId .. ". This player now has " .. userBalance .. " points total!" wait(5) message:Destroy() end)
This script doesn't work, as you have set it to say "If the amount of award-able points is 999999 and the amount of points that the character has earned before in the game universe is 9999999999, then give them one point". It is very unlikely that a player will fit those specified conditions, but if they do, this script will give them a point.
Isn't that cheating (Just by looking at it) it gives you an incredible amount of points?