This is book number 6 in the Bailey Fish Adventures series.
There's all sorts of trouble in Contrary Woods near where Bailey Fish and her friends, Noah and Fred Keswick, and their foster sister, Sparrow, live. The troubles include a destructive bear, mysterious messages in Morse code, a hunter, and disappearing clothes. When Bailey's cousin, Duck, arrives for a short visit, he refuses to fit in to the fun of country life. He misses life in the city and his computer games. Duck is afraid of bugs and doesn't want to get dirty. But soon the trouble in the woods intrigues even Duck, and he uses his creative mind to invent a monster-detector and a trap to catch whatever is responsible. What the trap snares surprises everyone