It is a scaled-back version of the total ban which some campaigners have called for, with adverts allowed on TV between 9pm and 5.30am, and also allowed with some restrictions online.
The move has been hailed as an important victory by charities and campaigners, but it is seen as one step in a long road to tackling Scotland’s obesity problem, as well as a range of other problems including tooth decay and other conditions linked to poor diet.
People with a healthy weight are in the minority in Scotland, at around a third, while two thirds of people are classed as overweight.
These Scottish Government classifications are based on Body Mass Index (BMI), which is considered by some to be an outdated measurement – but there is no question that Scotland has serious problem with obesity and weight gain.
A recent study from Glasgow University found that obesity is now a bigger killer than smoking in older age groups.
Risks associated with being overweight include developing type 2 diabetes, heart disease, strokes, and some types of cancer.
Another study, funded by the British Heart Foundation found obesity and weight gain is slowing progress in the reduction of heart attacks and strokes in Scotland. While some risk factors, including smoking, are falling, problems of excess weight are on the rise.
So how will a watershed on junk food adverts combat this?
Bad habits linked to obesity often start in childhood, the British Medical Association said in response to news of the ban.
"Prevention is vital, and a healthy approach to food should be encouraged from an early age,” said Dr Graeme Eunson, consultant paediatrician and chair of the BMA’s Scottish consultants committee.
The British Heart Foundation sees the ban as “one important measure among others”, which will help to change the “environment” around unhealthy eating.
The foundation works with a group of ten leading health charities to campaign for action on reducing this kind of risk factor, including Diabetes UK, Cancer Research UK and the British Lung Foundation.
There are “many similarities” across risk factors, including unhealthy food, alcohol and tobacco, said BHF Scotland policy and public affairs manager Jon Roden.
The relationship between advertising, obesity and other health risks like heart attack and stroke is “complex”, he said, and there are a lot of different factors at play.
“I think this is one measure amongst many more that really will help to change the environment that we all live in to help make the healthier choice, the easier choice, to help people to have a healthier diet, and reduce Scotland's weight as a result,” he said.
Lorraine Tulloch, programme lead at Obesity Action Scotland, said the partial ban should have a positive effect in years to come.
“We know that the influence that TV and online advertising has is significant, and it does influence what children consume in terms of their calorie intake,” she said.
“It will make a difference. What we do have to remember though is that obesity is a complex issue, and what causes children or adults to put on weight is complex. There is no one measure that will fix this.
“But the advertising makes up part of the food environment, so if we do much more around the food environment, if we restrict advertising, if we restrict what foods are on promotion, if we do all of those things, then it makes it much easier to stack the odds in favour of making a healthy choice rather than an unhealthy choice."
Currently, the odds are “stacked against” healthy choices, she said.
“Just now it's not a level playing field, everything pushes us towards the unhealthy choice, and we need to get back to a level playing field so that it's much easier for children, they don't feel that pressure and they don’t feel influenced into having to make an unhealthy choice.
“I think it will be a few years before we see it go through into childhood obesity but it is an absolutely important part of the jigsaw.”
What are the next steps?
Obesity Action Scotland is “a little bit worried” about loopholes and exemptions to the junk food advertising ban, said Lorraine Tulloch.
These include rules around online advertising, and the promotion of food and drink by social media influencers.
"Future-proofing” Scotland’s action to tackle obesity is vital, she said.
"It’s about being able to be more responsive to things which have grown more in recent years, like social media influencers,” she said, adding that “children’s media consumption is changing”.
Moving forward, campaigners also want to see the Scottish Government bring forward a bill to restrict price promotions on unhealthy food and drink.
These plans mark a divergence in approach from the Scottish and UK governments, with more comprehensive plans in Scotland, Obesity Action Scotland said.
Restricting price promotions is the “most urgent” action for the Scottish Government to take, said Mr Roden.
“What is really important in a topic like obesity is that there's urgent and incremental action,” he said.
“We're very influenced by our surroundings, and it's important that we start tackling that.”
The ban is not a perfect solution, and some groups were quick to point out that sugar, fat and salt are not the only markers of unhealthy food.
"Even sugar-free options of products like fizzy drinks can have a detrimental impact on teeth through acid erosion, with many people assuming sugar-free items will be better for their oral health,” said Prof Taylor.