The actor posed with students who were taking graduation photos at the Griffith Observatory in Los Angeles, California.