how to make this magic wand work

i have tried to make a magic wand that shoots a beam and deals 50 damage per hit and the problem is that i cant make it shoot anything it just doesnt work in the game i have tried it in version 1.20 and thats where i would like to use it

Continue to help post