Show animation in script

Hi all!
Apologies if this is the wrong board to post this.
I'm looking for the code required to play an animation on the player (as the event command would do)
Thank you!
$gamePlayer.requestAnimation(id); this.setWaitMode('animation');
$gamePlayer.requestAnimation(id); this.setWaitMode('animation');

I can't seem to get this working, I get errors. But I'll persist and try to see where it's going wrong.
Thank you!
ID is the ID of animation, rest should stay the same I think.
ID is the ID of animation, rest should stay the same I think.

Yeah, I got that. I think perhaps the other scripts I'm using are interfering with it.
That's because this code is for MV.
VXAce one is this:
Ruby:
$game_player.animation_id = n              # For Player
$game_map.events[eventid].animation_id = n # For Events
That's because this code is for MV.
VXAce one is this:
Ruby:
$game_player.animation_id = n              # For Player
$game_map.events[eventid].animation_id = n # For Events

Ah that's great, thank you!

Original thread: https://forums.rpgmakerweb.com/threads/show-animation-in-script.117648/