So, when a player dies, and a part of them (Ex. Torso, Head etc.) hits a different checkpoint, they spawn on the checkpoint that they hit, instead of the one they came from. How do I fix this?
Try destroying the humanoid's body parts to prevent them from touching when the player dies:
game.Players.PlayerAdded:Connect(function(player) local character = player.Character or player.CharacterAdded:Wait() -- if the character doesn't exist, we'll wait until it does local humanoid = character:WaitForChild("Humanoid") humanoid.Died:Connect(function() for _, bodyPart in pairs(character:GetChildren()) do -- loop :GetChildren() to destroy them all bodyPart:Destroy() -- destroy the parts end end) end)
Hope this helps!
One solution for this problem is to have the checkpoints detect if the player is dead. So like when the checkpoint is touched make sure ..Character.Humanoid.Health > 0 to set their checkpoint. This should do the trick!