So I made this script, it worked one time this morning, but now it is not working. Basically when you touch the part, it gives you a single player point. It doesnt award player points. All it does is print the of the plr and the players bodypart that touched it.
debounce=false script.Parent.Touched:connect(function(hit) print(hit.Name) plr=game.Players:GetPlayerFromCharacter(hit.Parent) if plr then print(plr.Name) if debounce==true then elseif debounce==false then debounce=true local PointsService = Game:GetService("PointsService") local pointsToAward = PointsService:GetAwardablePoints() local universeBalance = PointsService:GetGamePointBalance(plr.userId) if ( pointsToAward < 0 and universebalace == 0) then print("No Points left") elseif ( pointsToAward > 0 and universeBalance == 0) then pcall(function() PointsService:AwardPoints(plr.userId, 1) end) end wait(5) debounce=true end end end)
if ( pointsToAward < 0 and universebalace == 0)
on line 20 should be if ( pointsToAward < 0 and universeBalance == 0)