Mark Mason, 48, from Rhyl, died after being stabbed at the town's Home Bargains car park on 27 October 2016.
James Davies, 20, from Liverpool, denies murder and malicious wounding with intent.
Anthony Baines, 30, and Mark Ennis, 30, also from Liverpool, deny the same charges.
Jake Melia, 21, also from Liverpool, has admitted all charges.
The trial at Mold Crown Court has heard the attack was the result of a turf war which had erupted between two rival gangs over the control of the drugs trade in the Rhyl area.
On Monday, Mr Davies told the court he approached Mr Mason's car with a knife and banged its handle on the car window.
He said: "I just wanted them to see it and be scared.
"It was a stupid idea when I think of it but I didn't know it was going to end in the way that it did."
He said he did not inflict any injuries and he did not see how Mr Mason suffered 22 stab wounds.
He added he only discovered Mr Mason had been stabbed when he was told as they drove away.
The case continues.
A drug dealer has admitted waving a knife around in a Denbighshire car park before a man was fatally stabbed but denied using the weapon.