Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local Checkpoint = script.Parent
- local player
- Checkpoint.Touched:Connect(function(hit)
- if hit and hit.Parent and hit.Parent:FindFirstChild("Humanoid") and hit.Parent:FindFirstChild("Humanoid").Health > 0 then
- player = game.Players:WaitForChild(hit.Parent.Name)
- if player.leaderstats.Stage.Value +1 == Checkpoint.StageNum.Value then
- player.leaderstats.Stage.Value += 1
- print("Checkpoint Saved")
- end
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement