Needing help with Randf Movement

Im working on a animal for my game Planet Ani but im wonder how i should use Randf to decide which direction to move, im not really familiar with using randf and just wondering if anyone knows any tips

If you want to pick 1 direction out of 4, you could do this:

var directions := [Vector2.UP, Vector2.DOWN, Vector2.LEFT, Vector2.RIGHT]
var picked_direction: Vector2 = directions[randi_range(0,3)]

Or if you want a direction with an arbitrary angle:

var direction := Vector2.from_angle(randf_range(0, PI * 2.0))

More details may help, but if you want to create a direction from a random angle then you can do this in two steps

# get a random angle 0 to TAU
var angle := randf() * TAU
# convert to vector2 direction
var direction := Vector2.from_angle(angle)

thanks! hopefully i can implement it to my animal code and hopefully it works. since it should be randomly picking a direction to head and then walking there.