The slimes are always spawned below the Y level of 40, even though the light level is higher than 7. The players have to dig deep down to Y level 30 by exploring until they come across a naturally spawning slime.