this is the code
if (Multiplayerenemy != null) { World world; world = getWorld(); world.removeObject(Multiplayerenemy); Score score = multiplayerspace.getScore(); score.addScore(); }