TALLAHASSEE, Fla. -- It's up to Gov. Rick Scott to decide if Florida will ban texting while driving.

State lawmakers have passed legislation that bans drivers from texting while the vehicle is moving. But the measure would still allow drivers to text at stop lights or if they're stuck in traffic.

Bill sponsor Sen. Nancy Detert saID Florida is one of only five states without any restrictions on texting behind the wheel.

Sen. Detert has been working hard for years to pass the testing bill. Now she's relieved.

"We're very happy that Florida finally has a law. We're one of the last states to have a law making texting while driving illegal. I've done this for four years and I'm just very pleased that it has finally passed and I'm doubly pleased that I don't have to start over again next year."

The final version of the bill was not exactly what Detert wanted. A late amendment in the House prohibits prosecutors from getting a driver's cell phone records to confirm a violation, except in cases involving an injury or death.

But Detert said the measure will still allow parents to legitimately tell young drivers that texting behind the wheel is illegal and she hopes that helps change behaviors.

Detert said the law is not intended to be punitive.

"The whole purpose of the law is to retrain new drivers just like we did with seat belt laws. Every kid in America is programmed to put their seat belt on and it saves lives. We want them to be programmed to not text while driving and that'll save even more lives."

First violations would carry a fine of $30 plus court costs.

If Gov. Scott signs the bill, it will take effect October 1.