A 17-year-old boy was arrested in a play area following public reports on suspicious activity.
Wiltshire Police attended the play area just before children were due to leave school and conducted a search.
A young boy was found to be in possession of a large quantity of cannabis and several hundred pounds in cash.
He was taken to Melksham custody on suspicion of possession with intent to supply class B drugs.
A further search was conducted at his home address in Melksham where more suspected class A and B drugs were found.
PC Lee Pelling said in situations like this the police force rely on the public to act as their "eyes and ears" in the community.
The 17-year-old boy has been released under investigation while inquiries continue.