Yeah I noticed restart wasn’t working just before I had to submit. I couldn’t figure it out before the submission time ended.
Viewing post in Reinvent The Wheel jam comments
#in my game over script in the gameOver scene
var mainScene = preload(“scene.tscn”).instantiate()
func playAgain():
get_tree().root.add_child(mainScene)
self.queue_free()
#in the main scene
var gameOverScene = preload(“gameOver.tscn”).instantiate()
func gameOver():
get_tree().root.add_child(gameOverScene)
mainScene.queue_free()