vxを速度とする。

var x = 0, vx = 1
func _process(delta):
if (x == 100):
vx = -1
if (x == -100):
vx = +1
x += vx
print(x)