How to reset gravity when float = value? (Jetpack System)

I have created a Jetpack system and I have everything working except that after the Jetpack power runs out the player continues to hover instead of falling back to the ground.

The setup works with the gravity being set to 0 upon character launch.

I have used a float to get the Jetpacks power and scripted it to change
the gravity scale to 1 with the player as the target when the power is below 1
but it doesn’t seem to work.
I have tested it and identified the place of the problem highlighted below.