 Josh Cooley and Meg LeFauve were credited as co @-@ writers of the screenplay following their contributions during the rewrite . Like Docter , Cooley and LeFauve included experiences with raising their own children into the screenplay . Cooley said " ... we treated the emotions like parents for Riley and because all of us in the writing room are parents ourselves , we just reflected on our own experiences as parents to create the characters . " 
