I want the player to be disconnected when they die.
Call the Kick() method of player when the character dies. You can detect when a player dies using the Died event of humanoid.
Example:
game.Players.PlayerAdded:Connect(function(player) player.CharacterAdded:Connect(function(char) char:WaitForChild("Humanoid").Died:Connect(function() player:Kick() end) end) end)