Glamorgan closed Day 2 against Middlesex on 112/3 after the hosts were bowled out for 410, with Marnus Labuschagne and Marchant de Lange picking up three wickets each.
Labuschagne also compiled a counter-attacking 51 as Lloyd (12*) and Root (16*) saw Glamorgan through to close of play.
"It's a competitive game, we bowled very well and I thought we were a touch on the unlucky side," said Labuschagne. "It was disappointing (for them) to end up getting 400.
"We came out well with the bat and three for 112 is a decent position with two guys in form. I was just trying to be positive and it's frustrating to get out the way I did.
"I'd love to keep winning games with Glamorgan and when you're batting well yourself it makes it a bit more enjoyable, but team success comes first. At this stage I've got four more games, and it's great to help the club get in a position to potentially get promoted."