hi there!!
I followed the video on how to create a healthbar, the only thing i changed was instead of pressing the spacebar key to take damage, i made it such that when the player collides with the danger object, the player takes damage. However, the OnCollisionEnter function cannot be placed in the update function, so right now i have no idea how to pass that information into the update
(I'm actually not sure if im doing this right because my basics in unity is a little wonky)
I also set a debug log to check that the player has collided with the danger object and it shows, so the problem definitely does not lie with the collision part i think



