Creating walking animations on a 2D sprite in a 3D enviroment

hello! i recently got advice from a previous thread on how to make the player invisible and attaching a billboardgui etc etc. my new issue is figuring out how start the walking animation on my 2d sprite based on which direction the player is going. for context, this is what im talking about:
0eacec31bece1e83ba5a476a7520282c
image

the only way that i can think to create the effect i want is to assign the individual keys to a start a certain loop (ex. D key makes decal switch to the right facing sprite and a loop of the walking starts) however, an issue would arise from this for mobile players. is there any way to detect which direction the player is walking and begin a loop from there? thank you