Hello, I am making an obby that awards 100 player points for each time you win. I have the scripts prepared (Death, Change Team, and Award Player Points) but the problem is, everytime you step on the button at the end, it awards the player a ton of times worth 100 player points each time it awards the player. It has awarded me up to 14 times each time I use it but it usually remains in the 5 - 10 range. How can I make it only award the user ONE time? The script is below.
Script:
points = game:getService("PointsService")
script.Parent.Torso.Touched:connect(function(hit) if hit.Parent:findFirstChild("Humanoid") ~= nil then player = game.Players:GetPlayerFromCharacter(hit.Parent) if player ~= nil then a = points:GetAwardablePoints() Value = script.Parent.PP if a >= Value.Value then wait() points:AwardPoints(game.Players:GetPlayerFromCharacter(hit.Parent).userId, Value.Value) else end end end end)
