Objective: Lets give the beam attack it’s own damage as it wouldn’t make sense to just work like a laser projectile.
Step 1: Give the beam a collider
Step 2: Inside the attacktwo script let’s create a new collision detection. This time we will use Trigger2dStay so it will trigger the entire time the player is colliding
Step 3: Have it call the players damage method while in this state. This will create a very deadly beam attack that will most likely kill the player upon contact
Note: The example in the GIF above is with the player having 70 lives for testing the player will most likely die just by touching that beam with regular lives