title: Trying to remove my restart button once it is game over
body: <p>I am trying to get rid of the restart button once the player has lost 5 lives and it is GAMEOVER I have created. This code is not doing it for me, can anyone help me understand why?</p>
  
  <pre><code>func loseALife(){
      if lives == 0 {
          enumerateChildNodes(withName: "Restart", using: ({
              (node, error) in
                  self.removeAllActions()
          })
  
          runGameOver()
      }
  }
  </code></pre>
  
  <p>This is the function for the restart button</p>
  
  <pre><code>func createButton() {
      restartButton = SKSpriteNode(imageNamed: "restart")
      restartButton.position = CGPoint(x: self.frame.width / 2, y: self.frame.height / 2)
      restartButton.zPosition = 6
      restartButton.setScale(0.5)
      restartButton.name = "Restart"
      self.addChild(restartButton)
  </code></pre>