predicting the trajectory of the ball

You don’t have the velocity, so it won’t work. If it’s a tennis game, there should be only one ball, so instead of an array, get index 0 of class ball. From there you can call get actor location and get (horizontal) velocity from that one actor.

Vertical trajectory is a lot more complicated, but it looks like you don’t need it in this case.