2D Damaging Obstacles

Hi, i'm trying to make a 2D platform game, but i need to make obstacles damaging player.
I've downloaded Core Health Bar, but i don't know how to make the obstacle modify the bar.
Thanks for the help and sorry for bad english.

Hi, you can make something damage the player by using the apply damage function on the Player. This will automatically update the health bar (since it is based on the player's health).

If you added a Trigger to the obstacles and then created a small script that was a child of the trigger that used the begin overlap event then you would know when the player has hit the obstacle - and apply the damage.

The Trigger's example script that I have linked to contains most of what you need, you would just need to replace player:Die() from the example with player:ApplyDamage(Damage.New(25)) for example.

I hope that helps!

It Works! Thank you so much!!