Advertisement
tobik_roblox

Checkpoint Script

Aug 6th, 2024
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. local Checkpoint = script.Parent
  2. local player
  3. Checkpoint.Touched:Connect(function(hit)
  4. if hit and hit.Parent and hit.Parent:FindFirstChild("Humanoid") and hit.Parent:FindFirstChild("Humanoid").Health > 0 then
  5. player = game.Players:WaitForChild(hit.Parent.Name)
  6. if player.leaderstats.Stage.Value +1 == Checkpoint.StageNum.Value then
  7. player.leaderstats.Stage.Value += 1
  8. print("Checkpoint Saved")
  9. end
  10. end
  11. end)
  12.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement