Officials detained a student holding a replica handgun on the second-floor balcony of McMorrow Residential Hall shortly before 10 p.m. yesterday. USC Department of Public Security and Los Angeles Police Department officers arrived on the scene at about 9:40 p.m. after a surveillance camera operator allegedly spotted a person with a handgun.