# Angle shenanigans

**URL:** <https://forum.makecode.com/t/angle-shenanigans/24872>\
**Category:** Help\
**Tags:** graphics-and-math\
**Created:** [December 8, 2023, 7:07pm UTC](https://forum.makecode.com/t/angle-shenanigans/24872 "2023-12-08T19:07:50Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ADM\_F](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/adm_f/32/19808_2.png) [@ADM\_F](https://forum.makecode.com/u/ADM_F)\
**Post date:** [December 8, 2023, 7:07pm UTC](https://forum.makecode.com/t/angle-shenanigans/24872/1 "2023-12-08T19:07:50Z")

</div>

I cant share the game however i can share the code the second array works as intended but the first doesnot

 ![image](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/2X/e/ebb09b22b61d7e95e28ef3db882a3a520567e8c5.png)

what i want it to do is  
check if there is a player if there is one move it in that direction  
but if there is another sprite go towards that one instead  
(the velocity 0 things were me trying to fix it they don’t do anything)  
basically both do the same thing but the top one wont work

---

<div class="post-metadata">

**Author:** ![Sarge](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/sarge/32/19590_2.png) [@Sarge](https://forum.makecode.com/u/Sarge)\
**Post date:** [December 8, 2023, 8:00pm UTC](https://forum.makecode.com/t/angle-shenanigans/24872/2 "2023-12-08T20:00:49Z")

</div>

Sorry, not much can be done without the entire context. No sharing = no help I’m afraid. If you really want to fix it without sharing, try the debugger
