rename the checkpoint, or add an intvalue in the checkpoint containing the stage number
You need to find a different way. This “Debounce” just makes it so the script only works once globally.
Pretty much the point of this post.
You did not use .value
()()()()()
local Collected = {}
script.Parent.Touched:Connect(function(hit)
local Player = game.Players:GetPlayerFromCharacter(hit.Parent)
if Player then
if Collected[Player.UserId] then return end
Collected[Player.UserId] = true
Player:WaitForChild("leaderstats").Stage.Value += 1
end
end)
game.Players.PlayerRemoving:Connect(function(Player)
Collected[Player.UserId] = nil
end)
3 Likes