Move a magnetic compass of magnet on a string over a wall until the compass needle or magnet is attracted by the metal of the nails in the stud.
(the compass needle or magnet; is attracted; by the metal of the nails in the stud)
the compass needle or magnet
is attracted
by the metal of the nails in the stud