Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

(Read Body Because Title was too long) How do I fix this?

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?

2 answers

✓ Accepted answer

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!

1 comment

0

You can also turn off break joints in the humanoid property to prevent the parts from falling off.

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!

This discussion is preserved as it was. New answers, comments, and votes are closed.