Despite the decade-long study of the effect of nanoconfinement on the glass-transition temperature (Tg) of amorphous materials, the quest to probe the distribution of TgS in nanoconfined glass formers has remained unfulfilled. Here the distribution of Tgs across polystyrene films has been obtained by a fluorescence/multilayer method, revealing that the enhancement of dynamics at a surface affects Tg several tens of nanometres into the film. The extent to which dynamics smoothly transition from enhanced to bulk states depends strongly on nanoconfinement. When polymer films are sufficiently thin that a reduction in thickness leads to a reduction in overall Tg, the surface-layer Tg actually increases with a reduction in overall thickness, whereas the substrate-layer Tg decreases. These results indicate that the gradient in Tg dynamics is not abrupt, and that the size of a cooperatively rearranging region is much smaller than the distance over which interfacial effects propagate.