How do I make so when I hit an enemy there appears a label which shows how much damage I did?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By BlockOG

This is also for my “Action RPG” and I want to know how I can make it so when I hit an enemy it creates a label which shows how much damage I did (1 or 2) like in Terraria

How do you deal damage?
Just add a Label with the damage with a Timer or an Animation which deletes/fades the Label after some time.

whiteshampoo | 2020-05-29 12:53

I deal damage with a hitbox and the damage is taken by a hurtbox

BlockOG | 2020-05-29 13:06

Thanks @whiteshampoo

BlockOG | 2020-05-29 13:07

:bust_in_silhouette: Reply From: Asthmar

Create a label, hide it. In script only show the label when damage is taken, and you can also add a fade with the animation player, then hide the label once animation is finished (Using the signal). To chose what number to show, just set your label text as you whatever damage variable is.