Here, I’ll give you a freebie. Try this function on for size.
# Based on the "random.choice()" function found in Python.
func random_choice(list: Array):
if list.empty():
push_error("Size of array is zero.")
return
return list[ randi() % list.size() ]
Pass your array to this function and it’ll choose a random element.