Object doesn't move if variable is used?

If I have this code:

if (bally>posy)
		{
			//above
			transform.Translate(0,speed*Time.deltaTime,0);
			print ("I should be moving up");
		}
		if (bally<posy)
		{
			transform.Translate(0,-speed*Time.deltaTime,0);
			print ("I should be moving down");
		}

Nothing happens, but if I have 1f, and -1f instead of “speed”, then it works as it should. Anyone know why?

Add a Debug.Log to see what your speed value is. I’d say it is probably zero which will cause the translation to have no effect, or a very small number so the movement is barely noticeable.