How to model trajectory with Beams?

I’m a little confused on how to set this up. I currently have a part with two attachments in it with a beam and script, but it’s not working right. Where do put the beams? And the script? And what about the attachments orientation?