Using Riolu or Lucario against Byron, the Canalave City Gym Leader in Pokémon Pearl, is not recommended. Byron's team consists primarily of Steel-type Pokémon, which inherently resist Fighting-type moves—the primary STAB (Same Type Attack Bonus) of both Riolu and Lucario.
Additionally, Lucario takes neutral or resisted damage from Steelix's likely moveset, which often includes Earthquake and Flamethrower, further diminishing its effectiveness.
The key is exploiting Steel's weaknesses (Fire, Ground, Fighting) with Pokémon that can withstand its offensive pressure.