This is the super ultra simple script to respawn players. Click on every BLUE and ORANGE text to learn about the function, and complete the script.
addEventHandler ( "onPlayerWasted", getRootElement(),
function ( )
fadeCamera ( source, false ) --To make a simple beauty effect that fades player's camera out
setTimer ( spawnPlayer, 1000, 1 ) --YOU SET THE PARAMETERS (POSITION, ROTATION, SKIN, ETC)
setTimer ( fadeCamera, 2000, 1, source, true ) --Then returns camera to normal.
end )
And for the spawning, use:
getZoneName