The use of bed and breakfasts to house homeless families is to be banned by the Scottish Executive.
The executive has vowed to end B&B accommodation for children
The order was put before parliament on Thursday morning.
But critics say it is not possible to find enough alternative accommodation for families because of the current housing shortage.
A member of the executive's task force on homelessness, Edinburgh housing director Mark Turley, has resigned from the group following the order.
The Homelessness (Scotland) Act places a duty on councils to provide temporary accommodation for homeless people.
The executive had pledged that by this Christmas no child would have to live in B&Bs other than in "exceptional circumstances".
By next month, councils will have to ensure families are only placed in this kind of accommodation in an emergency situation and only for a maximum of two weeks.
But Mr Turley said the executive was expecting too much from local authorities and he could not continue to be a member of the task force.
The move was announced by Communities Minister Malcolm Chisholm, who said it
was further progress towards the executive's goal of providing permanent homes for
all homeless people by 2012.
But the Scottish Federation of Housing Associations (SFHA) has said there were not enough houses to make the proposed system work.
Mr Chisholm said: "Councils have been making good progress since the new laws were passed and many no longer use B&Bs for families with children.
"We do recognise, however, that in some circumstances B&Bs may be the only
realistic option, such as in domestic abuse cases or if it allows children to
remain at their usual school.
"But we still have concerns about children being housed in unsuitable
accommodation while their needs are being assessed."
Under the new rules, temporary accommodation offered to families with children
and pregnant women must meet safety and quality standards, including a private
bathroom and access to kitchen space.
Accommodation which does not meet these standards can only be used in
emergency circumstances and for a maximum period of 14 days.
In March this year, 151 families with children were living in B&B
accommodation in Scotland.
The move was welcomed by the housing charity Shelter, which has campaigned for
10 years to end the "scandal" of children living in B&Bs.
Liz Nicholson, director of Shelter Scotland, said the regulations would "make a real and immediate difference".
But she added that the charity was concerned at a lack of suitable temporary
accommodation in some areas of Scotland and called on the executive to make
sure councils had enough support to guarantee a better life for homeless
Liz Burns, policy officer for the Scottish Federation of Housing Associations, warned that a higher level of investment into affordable housing was needed.
She told BBC Scotland: "Temporary accommodation should be a stop on the way to affordable rented housing for people who have been homeless.
"But what concerns us is that, if people can't move out of temporary housing because of a lack of affordable accommodation, we are going to need more and more temporary housing to keep people away from the B&Bs.
"We estimate that about 10,000 to 12,000 new affordable homes are needed every year. What we have at present from the executive is 16,000 new homes but over three years."