Why does my script float variable value not update after I change it in Unity?

So when I type a float variable for something, and declare it public, when I open unity, it appears and I can change it. However, when I change it in Unity and save, the updated variable does not change in my script.

Changing in the inspector will not change it in the script.

Inspector overrides the script. It is so you can ‘play around’ with the values. If you want the Inspector values to appear in the script, you enter it manually.

Did you save your script?,If it does not change in your script,then you probably forgot to save your script i guess?