The FVector Set operator/Function

There is no reason in the code you posted it will select something ‘randomly’. Make sure your vars PS_01, Ball, etc are defined properly. I’m assuming things are set otherwise you’d get a crash on line 41.

I would set a breakpoint at line 20, run your game to activate the break, then step thru your function line by line to see what is going on.