A student in Randolph County was taken into custody Thursday evening after allegedly bringing a gun to school.