I am making a game that awards Player Points when you get to a certain platform but, I don't want people waiting at that one platform and keep on getting the player points. Here is what I have that doesn't protect that.
local PointsService = game:GetService("PointsService") local db = false local dbTime = 6 script.Parent.Touched:connect(function(hit) if not hit.Parent:FindFirstChild("Humanoid") or db then return end local player = game.Players:GetPlayerFromCharacter(hit.Parent) if player then db = true PointsService:AwardPoints(player.userId, 6) wait(dbTime) db = false end end)