I think that quote is from “The Patriot”. The Braveheart timeline was before guns were invented.
MarQ
https://www.phrases.org.uk/bulletin_board/18/messages/305.html
Don’t shoot until you see the whites of their eyes. Earliest quote
...At Dettingen, Flanders, on June 27, 1743, Lieutenant-Colonel Sir Andrew Agnew of Lochnaw (5th Baronet) gave to the men or his regiment, the 21st of Foot, an order from which this saying is derived. A man of spirit even for the times, he had earlier in the day replied to a brigade order that “the scoundrels will never have the impudence to attack the Scots Fusiliers”, but they did.
Formed in square, the Scots Fusiliers held a steady fire rolling along their lines and kept off the advancing French infantry.
Sir Andrew, a resourceful and experienced officer, had in training practised a novel battle drill with the men in his square, should they be attacked by cavalry.
At last, the opportunity to spring this trap appeared when the square was attacked by enemy cuirassiers. Instead of employing the orthodox tactic of seeing them off by standing firm and taking the charge on muskets and pikes, Sir Andrew gave orders that, as the cavalry approached the front line, the two centre companies should divide from the centre and fall back from the outer markers. This novel approach allowed the cavalry to charge through a lane with the Fusiliers facing inwards. At this point Sir Andrew gave the command:
“Dinna fire till ye can see the whites of their e’ en . . . if ye dinna kill them they’ll kill you.” The French, as they rode through this lane of soldiers, were subjected to a withering crossfire and destroyed.....