Does anyone know how to check the angle from the forward axis of a player to an entity

I want to check angle and change the sprite according to the angle

Hi @amazic7 !
Have you tried using entity.rotateLocal(0,0,0)?