HOLLYWOOD (CBSMiami) -- The teen accused of making a threat on social media and posting a disturbing video of a person pulling out a gun and pointing it at the back of unsuspecting students in a classroom sat in a Broward county courtroom Thursday.
Judge Michael Orlando said 16-year-old Wilmer Martinez will be interviewed by a psychologist to try and get some answers about his behavior.
"What sort of issues he may be dealing with or struggling with or what would cause him to engage in this sort of behavior?" Judge Orlando told the teen and his parents, who attended the hearing. Martinez's parents declined to speak to CBS4 News after the hearing.
Martinez will be held in juvenile detention for at least 21 days.
Prosecutors asked that if the teen is released at some point he not possess any weapons, go on social media or contact any witnesses in the case.
Martinez was taken into custody Wednesday after multiple people reported Martinez' social media posts, according to police.
The social media post that featured a threatening caption read in part, "I'm debating on whether I should carry my pistol w me like last year" and showing a person pulling out a gun inside a school classroom.
Police say the video may have been filmed last year even though it was posted on Tuesday.
Martinez faces a felony charge of electronic threat to kill.
The video brings to mind deadly school shootings like the one in Parkland 18 months ago that continues to traumatize the South Florida community. Police say if there's one takeaway to this disturbing video it's that the community stepped up and reported it to law enforcement.
WATCH THE VIDEO BELOW:
CBS4 News obtained the arrest report in Martinez's case. It shows that he admitted making the posts.
In the report an officer writes, "The defendant stated the postings were a joke and were not serious."
This is not the first time Martinez has been in trouble. This past April a police report shows Martinez was expelled from McArthur High School for bringing 44 bullets onto campus.
The police report in the case says Martinez told police "he discovered the ammunition on the road while walking to school" and "he picked up the ammunition and placed it inside his backpack to dispose of it on his way to school but he forgot."
Police searched Martinez and no weapons were found.
His mother told police "no one in the household owns a firearm."
Hollywood Police say a member of Martinez's family, 29-year-old Elba Martinez-Bermudez. was also arrested Wednesday for obstructing the investigation.
If you have additional information about the video, you're asked to call the Hollywood Police Department.
for more features.