I read this about 30 years ago but I can't remember what it is named.
In the future, a few "real" scientists still exist in semi-secrecy. A lot of inept people believe that they are scientists but in fact play with high-tech Legos and build "inventions". By accident, a small group of them build a working time machine and start wreaking havoc on the time continuum. A group of the real scientists see the danger and chase them to put things right.