I have a Motorcross game (Fairly popular) and every time someone crosses the finish, it awards 7 points! Not 1! At the rate it's going, it'll run out in 40 races!
local part = script.Parent
debounce = false
part.Touched:connect(function(part)
if debounce == false then
debounce = true
local g = game.Players:GetPlayerFromCharacter(part.Parent)
if part:IsA("Part") and (g) then
pps = game:GetService("PointsService")
if pps:GetAwardablePoints() >= 1 then
wait(3)
pps:AwardPoints(g.userId, 1)
end
wait(.2)
debounce = false
end) -- Got the red squiggly line thing!

6 comments
Thats what I told him yesterday..
Great minds think alike :)
Yeah, but both your's didn't work. Tempestem had a red quiggly line thing (No idea what their called...) on 'end)' and adding a third end broke the script whilst adding yours, had the red line under ' if debounce = false then' and addming my code didn't work. Both "great" minds didn't exactly work...
It should be if debounce == false, my bad.
Check the code now. I updated teh question. Also, the end) has the error squaiggly line!
If you hover your mouse over the red line, it should tell you in the bottom left corner of Studio what the error is. In this case it is that you need one more end. It should go right after debounce = false.