Changing CFrames using a Server script, help needed!

My code works fine when I reset the character but not when character jumps and dies due to Destroy Height.

Below code gives HumanoidRootPart as output when I reset and it keeps giving nil when character dies due to fallen parts destroy height.

player.CharacterAdded:Connect(function(character)
	character.Humanoid.Died:Connect(function()
		local H
		repeat H = character.PrimaryPart print(H) wait() until H~= nil
		if Stage.Value ~= 0 then
			H.CFrame = workspace.Obby.Checkpoints[Stage.Value].PrimaryPart.CFrame + Vector3.new(0,20,0)
		end	
	end)
end)

You can just try this to yield

player.CharacterAdded:Connect(function(character)
	character.Humanoid.Died:Connect(function()
		local H = character:WaitForChild("HumanoidRootPart")
		if Stage.Value ~= 0 then
			H.CFrame = workspace.Obby.Checkpoints[Stage.Value].PrimaryPart.CFrame * CFrame.new(0, 20, 0) -- Use * for CFrames to add and make it a CFrame instead of a Vector3
		end	
	end)
end)

It won’t work, I’m making it client-sided.