I know this is a general question, but hopefully it makes it easier. In short, I can easily do theoretical and methodical scripting, i.e. game scripts and such. But the moment I try to make a gun or a realistic lightning bolt, I can't wrap my head around it. Is it a lack of knowledge in math or is there something I'm missing?

I'll make the question simpler: could you tell me (not asking for a script, just a process of how to go about this) how to make something like this? Thanks.