Damage Popup Code Help

Hello,
I use RPG Maker MV.

I'm using Yanfly's Damage Core, which allows use of javascript to make damaging skills. But, I can't make the damage number popup when I damage the enemy. Here is my code

<damage formula>
var blue = 500;
target.gainHp(-blue);
target._result.hpDamage = blue;
if (target.hp <= 0) {
target.performCollapse();
}
</damage formula>


I have also tried target.startDamagePopup(); and it doesn't work either. Could anyone help me figure out what I am doing wrong?
Thanks!
I thought Yanfly's battle engine core does it by default.

Original thread: https://forums.rpgmakerweb.com/threads/damage-popup-code-help.87598/