I’m trying to write my spectating system to handle situations when the spectated player dies or leaves the game, currently I have a while wait(1) do loop in the background of a LocalScript that checks if the CameraSubject’s parent is nil and it resets the camera if the parent is indeed nil. Since the CameraSubject instance remains even when it no longer exists, I feel like this is the simplest solution and it does work without any issues so far. Would this ever run into any problems? Are there any better practices to utilize?
Keeping in mind, the most important thing is that the player is not allowed to continue spectating a place where a player no longer exists, but it’s okay if there’s a short time delay before it’s fixed.