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.

Monitor is looking into the financial sustainability of Southend University Hospital Foundation Trust "on behalf of patients", the NHS regulator said.
Finances became a concern when a planned £7.8m deficit grew, for which Monitor could see no recovery plan.
The hospital blamed the larger-than-anticipated deficit on growth in demand and increased staff recruitment.
Hospital chairman Alan Tobias OBE, said:  "The overspend is a result of vital investment in services and more staff to ensure high standards of patient care as well as the rise in attendances.
"We welcome this review to clearly demonstrate to Monitor - as well as patients and stakeholders - our future financial plans are both robust and sustainable."
The hospital has pledged to cut the deficit while maintaining "high quality care for local people" and said it was committed to returning to a surplus within three years.
Monitor said its investigation will look into the state of the hospital trust's finances, assess the strength of its financial management and explore ways of improving its sustainability, on behalf of patients across the region.
The investigation will also examine how the trust works with other local health and care organisations to respond to the financial challenges it faces.
Katherine Cawley, regional director at Monitor, said: "People are relying on Southend to provide them with quality healthcare now and in the future, and we are concerned that this may be at risk because of the trust's poor financial performance.
"We have launched this investigation to find out more about the financial situation at the trust and to establish what can be done to improve things."

Liberal centrist Emmanuel Macron - winner of the first round - and nationalist Marine Le Pen are already revolutionising French politics.
They have delivered a big blow to the long-dominant Socialists and conservative Republicans.
Mr Macron leads a new movement called En Marche (On the Move), while Ms Le Pen is backed by the National Front (FN). They disagree on many issues, especially Europe and immigration.
The decisive second round is on 7 May - and polls suggest Mr Macron is ahead. So what are the main differences between the Macron and Le Pen visions?
Macron:
Le Pen:
Macron:
Le Pen:
Macron:
Le Pen:
Macron:
Le Pen:
In depth: Meteoric rise of Emmanuel Macron
In depth: Is Marine Le Pen far right?
Five things the French election has told us
France heads into uncharted waters
Macron:
Le Pen:
Macron:
Le Pen:
Macron:
Le Pen:
Macron:
Le Pen:
%
Emmanuel  Macron
%
Marine  Le Pen
Please enable Javascript to view our poll of polls chart.
Last updated  April 25, 2017
The polling average line  looks at the five most recent national polls and takes the median value, ie, the value between the two figures that are higher and two figures that are lower.
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.
[NEXT_CONCEPT]
A £9.8m deficit recorded for 2014/15 at an Essex hospital is to be investigated by a health service watchdog.
[NEXT_CONCEPT]
National renewal is what both the rival French presidential candidates are promising, but they offer very different paths to get there.