Teleport action only performed once?

What is the script meant to do?
The script should teleport the player to another location while the “game” is running. It does this fine the first time but dying just makes the script not work. Here is an example:

Here is the problematic part of the script:

inRound.Changed:Connect(function()
	if inRound.Value == true then
		while wait() do
			for i, player in pairs(game.Players:GetChildren()) do
				
				local char = player.Character
				local spawnlocation = math.random(1,5)
				local charparts = char:GetChildren()
				
				for i, charpart in pairs(charparts) do
					
					charpart.Touched:Connect(function(otherPart)
						
						if otherPart.Name == "TPpart" then
							
						charpart.Parent.HumanoidRootPart.CFrame = roundSpawns[spawnlocation].CFrame
						end
					end)
				end
			end
		end
	end
end)

Edit: Never mind, I found the solution. I had to add a while loop. I’ll leave this here incase anyone encounters the same issue:

inRound.Changed:Connect(function()
	while inRound.Value == true do

		for i, player in pairs(game.Players:GetChildren()) do
					
			local char = player.Character
			local spawnlocation = math.random(1,5)
			local charparts = char:GetChildren()
					
			for i, charpart in pairs(charparts) do
				if charpart:IsA("Part") then
					charpart.Touched:Connect(function(otherPart)
						if otherPart.Name == "TPpart" then
							charpart.Parent.HumanoidRootPart.CFrame = roundSpawns[spawnlocation].CFrame
						end
					end)
				end
			end
		end
		wait()
	end
end)