transform.position stop

can anyone help me with my transform.position.

basically i have a wheel which moves forward and brakes and also slows down after time if i let my finger go of the button.
works fine on flat however when i hit a slope it wont stop going backwards when its back on flat.
even if i go forward it will start going backwards again.

im usin
transform.position.x = transform.position.x + speed * Time.deltaTime
to control the transform, using the speed in each if statement to change the way it moves.

i believe what it is doing is when i hit the ramp it is changing the actual position so it then believs that the speed its going backwards is where it needs to stay if u understande what i mean. and then plus the speed to it going backwards.

just need a way to stop this so i can say
stop this god dam position before i smash my comp;

i had a rigidbody on the main bike then a joint onto the wheel that i had rotate on and the collider.
i chucked that script out the window too much going on at once for the computer to read. going with torque instead gives a realistic effect without much script