Show Heal One animation on sole party member through event command or script?

Hello! I'm new, and this is my first post! 😀

So I'm working on the first boss fight in my game, and there is a moment where the sole party member is overwhelmed by the boss and when they fall into the low HP state, an event is triggered where an off-screen mage heals them before joining the fight.

I've got it properly set up to heal the character, but there is no visual representation of that happening. So I'm trying to get it to play the Heal One animation (default 0041) on the sole party member BEFORE the mage comes flying into the scene. I found a thread in the MV forums from 2019 where someone was having the same issue. It seems all of the event commands can only play animations on enemies. Someone suggested they write a single line to a script, and it seems that did the trick for them. But this is MZ, so I guess something is different...

So... I'm open to suggestions lol Let it be known that I have no experience with coding, but I am very much open to learn.

The thread discussing the same issue in MV: https://forums.rpgmakerweb.com/index.php?threads/show-battle-animation-on-actor.113467/

The script I tried writing, following the suggestion to the best of my comprehension:
$gameParty.members()[0001].startAnimation(0041, true, 1)

The error the game throws upon reaching the script processing command:
6obw2q5.png
In MZ, you do this.
JavaScript:
$gameTemp.requestAnimation([character], animationId)
Which is your case, it will be
JavaScript:
$gameTemp.requestAnimation([$gameParty.members()[0]], 41)
And just like that, my problem is solved! 🙂 Thank you!

So, I hope I'm not asking too much, but can someone help me break down that script, and also the error I was getting so that I can understand it? Or direct me to some useful, easy-to-follow media that I can learn from?

I'm not a 'put fuel in the car and it goes' kind of learner. I need to understand the role and function of every little part in order to feel satisfied with my knowledge. 🙂
1) all error messages "of NULL" or "of undefined" basically mean that the engine tried to access a data object that does not exist. This can be because of a typo (wrong name) or because a reference ID is wrong (referring to an actor that does not exist) or something similar.

2) NEVER use leading zeroes on any ID in any script. The animation ID is 41 and NOT 0041.
The editor has the limitation of needing those zeroes to display numbers, but in script a leading 00 indicates that the number is octal, not decimal. For example octal 0041 is decimal 33 - you get the wrong IDs that way.

3) while both MV and MZ use javascript and are very similar, several of the functions were changed either for compatibility reasons or to improve performance. If you see a script command for MV you can try it in MZ, but it is never guaranteed to work. Some do, some do not, and you have to check each individual example on its own.
Thanks, Andar! #2 was the most helpful, since I had no idea that the zeroes were never to be used.
You only have 1 party member and you're accessing the second member. Array start at 0, not 1, so you're trying to get the second party member.

Original thread: https://forums.rpgmakerweb.com/threads/show-heal-one-animation-on-sole-party-member-through-event-command-or-script.142125/