What is wrong here? [Solved]

Whole script should work but the beam effect in the rule (fire bolt) won’t appear, the variables seem to be set correctly, I can’t find any reason for it to not be working. Code: 3D8HR

Edit: I tried changing the beam from a bad beam to a grapple beam, now I see the beam for a second before it dissapearrs. I check the inspector and no action had been run to destroy the beam. The beam is set to points in the air, could that be a problem? Code has been updated to show this, as well as let you use the whole script multiple times without having to restart the lobby.

Edit 2: After continuing as normal, the bug stopped happening. I have no clue as to the reason of the bug, but the code here is not updated so it should still be visible if anyone wants to look into it.