Super stuck on a dumb button

Hi! I created a game on xcode but then decided I wanted a main menu. I created the main menu through the main storyboard but I cant seem to get the button to load the game scene. Any suggestions?

What code are you using to try to load the game scene?

you should just add an IBAction to your button normally and have the action just present the GameScene

I added an IBAction. This is my code. I know I’m missing something because when I click the button the app crashes and the error is Exception NSException * "-[SKView playButton:forEvent:]: unrecognized selector sent to instance This is my first time ever building an app so I’m sure I’m doing something silly.

@IBAction func playButton(_ sender: UIButton, forEvent event: UIEvent) {

    let view = self.view!

    if let scene = SKScene(fileNamed: "GameScene") {
        scene.scaleMode = .aspectFill


i think theres a mistake somehow on how you added it, a normal IBAction should only look like this

@IBAction func playButton( _ sender: Any ) {


so it seems that theres something different with your headers/parameters

i suggest deleting it and try connecting again

I changed it to what you suggested but it’s still giving me the same error :frowning:

Any other suggestions?

It puts the error here though:

class AppDelegate: UIResponder, UIApplicationDelegate {

Error message is:

Exception NSException * “-[SKView buttonPlay:]: unrecognized selector sent to instance 0x7fddfe820200” 0x0000600003f61470