You’re setting the random_dir and up_down variables before calling randomize() in ready(). Try this way:
var random_dir
var up_down
func _ready():
randomize()
random_dir = randi() % 100 + 5
up_down = randi() % 10
if up_down >= 5:
random_dir *= -1
You could probably be a lot more concise, but it’s not clear what the rest of your code needs these variables for.
Thanks that worked. I realized that I was very vague with my question - those variables were simply to figure out the direction the ball moved for the vector2 move_and_slide y-coordinates. When I said going down I meant at the same slope (though you probably already realized that).