Which works great as a very basic respawn system. The biggest problem was indeed ending the if-statement with a semicolumn. This caused the script to not actually execute what was defined in the function.