How to allow player to turn in cardinal directions

Most difficulty chart obbies have the option to turn with the , and . keys (< and >).
I’ve been searching around and couldn’t find out how to enable that feature.
How to I make the player turn with these keys?

It uses the :PanUnits() function which is deprecated (it does still work though).

You can bind the keys to the function by using UserInputService.