Electric bolts/Sparks

Currently creating a script that would look really good with 3D sparks. Just 2 squares with one segment stretched

Only issue is that i have no idea how to create it. I want it to go around the player like this

Any help is appreciated.

Well Depending on how good you are at scripting I would create some new instances some like ropes or rods and some lightning then I would attach the ropes or rods to the player and add lighting as a child of it then done.

Yeah but that could cause some intense lag with the physics of ropes being created and stuff.

Also pretty sure ropes consist of multiple segments to create the illusion that it bends smoothly

I only really want 2 segments

You can try using Particles for this.

If you want to use a script then I can’t really help you. I know how to generate lightning, but in your case it’s sort of different. However, if you want some pointers then I’d start with creating random points on the players torso and then creating neon parts between them in a specified order. However, for a smooth effect you’ll most likely want this to be client-sided, otherwise the neon (I assume this is the material you’ll use) parts may lag behind the character while they are walking.

Also, you mentioned lag due to physics calculations and instancing. The lag caused by instancing could be avoided with PartCache, for all your quick part-creation needs.

I use this module in my game for a spark gun, it works well and looks good.

1 Like