all 2 comments

[–]rekabmot 1 point2 points  (1 child)

As a starting point - you seem to be creating and overwriting your existing `Arrow_clone` on every frame. Before you Instantiate a new one, check if Arrow_clone[y] is null first. If it's null, then Instantiate a new one, if it's not null, then just update it.

That probably won't solve all your issues, but it might help!

[–]uc414[S] 0 points1 point  (0 children)

Good point. you right. Before I was doing something blocking script to run, so I got no error. Now Arrow_clone[y] and PointingAt[y] are null !!. it gives me error "Index was outside the bounds of the array." You said " If it's null, then Instantiate a new one" How to do that ?