As California grapples with how to deal with heat waves made more intense by climate change, schools in the state may soon have to come up with plans for cooling down outside play areas by planting more trees and replacing surfaces like asphalt that swelter on hot days.

The state Senate passed the legislation that would require public and charter schools and districts to strategize on how to introduce more shade on campus, plant gardens and replace surfaces that hold on to a lot of heat with alternatives such as grass and wood chips. There’s no timeline for when the plans would have to be implemented.

“We needed this a long time ago,” said state Sen. Caroline Menjivar, a Democrat representing the San Fernando Valley in Los Angeles County. “We are making up for the decades of delay that we’re in right now.”

Only a handful of state senators voted against the bill. It would still need approval in the state Assembly.

The bill is a starting point that will set schools up for any future, stricter legislation that could mandate how they have to mitigate heat, Menjivar said.

It’s one of many ways California could try to fight intense dry, hot conditions that have afflicted the state in recent years. Last year, a brutal heat wave left the state debating how to avoid blackouts as people cranked air conditions when temperatures broke records in several cities, including Sacramento’s all-time high of 116 degrees Fahrenheit.

Children are at a greater risk than adults of suffering from heat-related illnesses that can cause nausea, muscle cramps, fatigue and fainting, according to the U.S. Centers for Disease Control and Prevention.

Some groups agree with the broader goal to mitigate heat at schools but say the bill still misses the mark. Ian Padilla of the California Coalition for Adequate School Housing, which advocates for state bonds to help update school facilities, said implementing the legislation would cost too much and overlaps with some existing standards set by the state to plant shade trees outside buildings.

The legislation could cost the state “in the low to mid hundreds of millions of dollars,” or at least $10,000 per school by providing grants for schools to implement their plans, the Senate Appropriations Committee estimated.

Another flaw in the bill is the inclusion of wood chips as a possible alternative to things like rubber, Padilla said. Schools have in recent years moved away from wood chips because they could cause injuries to students when they fall down, he said.

Christina Hildebrand, president of A Voice for Choice Advocacy, a health nonprofit sponsoring the bill, said the legislation is needed to ensure more trees get planted in low-income areas where they aren’t already abundant.

It’s essential that schools “that don’t necessarily have the resources” or “community backing to do this, get it,” Hildebrand said.

Courtney Tompkins, who lived in the Southern California city of Laguna Niguel before moving to Massachusetts, said her son, who is autistic and was at the time completely nonverbal, was left asleep outside for more than an hour on a hot day at school in 2016. Tompkins found out about the incident at the end of the school day from a teacher, she said.

She said she filed a negligence complaint with the state over the incident, which resulted in a settlement in which her son was placed at a different school. Tompkins said she could not name the school district because she signed a non-disclosure agreement as part of the settlement.

Othman Ramadan, a teacher at Animo Legacy Charter Middle School, a majority-Latino school in Los Angeles, said it got so hot at one point last school year that they had to temporarily keep students from playing soccer outside.

Ramadan has worked at another school with poor air conditioning where students on hot days had to use ice packs to cool themselves down after suffering from heat exhaustion, he said. Planting more trees around schools can have a wide-ranging effect, Ramadan said.

“It would make a huge difference in terms of the mental health and physical health of our students,” Ramadan said. “If more of the basic needs are met, then some of the higher things on the pyramid can also be achieved.”