So i'm getting this error that says EXC_BAD_INSTRUCTION and I have no idea why can anyone shed any light on it?? the code in question in bold below. Just so you know this is using SWIFT
**actionArray.addObject(SKAction.moveTo(CGPointMake(position, -alien.size.height), duration: NSTimeInterval(duration)))**
actionArray.addObject(SKAction.removeFromParent())
alien.runAction(SKAction.sequence(actionArray))
Here is a longer view of the code for you
alien.position = CGPointMake(position, self.frame.size.height+alien.size.height)
self.addChild(alien)
let minDuration = 2
let maxDuration = 4
let rangeDuration = maxDuration - minDuration
let duration = Int(arc4random()) % Int(rangeDuration) + Int(minDuration)
var actionArray:NSMutableArray = NSMutableArray()
actionArray.addObject(SKAction.moveTo(CGPointMake(position, -alien.size.height), duration: NSTimeInterval(duration)))
actionArray.addObject(SKAction.removeFromParent())
alien.runAction(SKAction.sequence(actionArray))
actionArraydefined?positionis definedpositionin the line that is crashing.