get current Variable Value

No my bad what i mean

E.G.
When the sun moves at (69) and than stops (0)
The sun needs to go back to the last value (69)

Other example
When a car speed is (33) and than stopes
I dont want it to exalirate but to go emidiatley to (33)