Setting player direction to game variable?

Hello,

I'm trying to recall the players direction. I know about saving game data player direction to a variable, but what is the script call to restore it? Couldn't find it on my searches.

Thanks!
$gamePlayer.setDirection(numberhere)

2 is down, 4 is left, 6 is right, 8 is up (corresponding to the positions on a numpad). If you've stored the direction in variable 1, it'd be $gamePlayer.setDirection($gameVariables.value(1))
Perfect thank you!

Original thread: https://forums.rpgmakerweb.com/threads/setting-player-direction-to-game-variable.143129/