Complex sentence: He played the role of Josh for six months, when the storyline reached an end and the Bates family joined Josh and his mother for a new life in Scotland.
Split into simpler sentences: He played the role of Josh for six months. When the storyline reached its end, the Bates family joined Josh and his mother for a new life in Scotland.