Position changes at the same rate no matter what the speed variable is

So, real quick question:

transform.position += transform.up * Time.deltaTime * speed;

When I run this line of code, the object moves the same amount no matter what the speed variable is. If I leave the speed out of the equation, it’s too slow. I can’t think of any other way to change it. Any help or explanation?

If you initialized ‘speed’ as a public variable in the script, that initialization only happens when the script is attached. After the script is attached, changes to the initialization are ignored, and it is expected that the value is changed in the Inspector. So either make the variable private or change the value in the Inspector.