For an Add-On I'm making I have it so that when players die they can't respawn. I'm using a default script found in the speed kart code to delete the player and put them in spectate mode, but the screen goes nuts.
%player = %client.player;
%player.delete();
%camera = %client.camera;
%camera.setFlyMode();
%camera.mode = "Observer";
%client.setControlObject(%camera);
Any ideas on what's going on?