When motor is idling there’s a racket going on sounds like in top of transmission but it comes and goes (sounds like maybe gears )
Look under the car near the exhaust upmtowards the engine for a heat sheild that has broken loose. Start there and post back with what you find.
Thanks will be a couple days to get back to you