Thank you everyone who helps
public void NextLevel2()
{
if (score == 20){
Greenfoot.setWorld(new L3());
//This code changes the back ground to level 3 when 20 points are scored
}
}