Still have questions? Join our Discord server and get real time help.
Log in to vote

Creating a 'Lightning Bolt' Effect for a Projectile?

Asked by 8 months ago
Edited 8 months ago

This question requires a concept in accordance with the guidelines; I'm just looking for a point in the right direction to tackle this.

I've looked around for a way to do this and dissected several models from the Library but to little deliverance.

I'm working on a tool that fires projectiles at the position where the player's mouse, though at the moment (naturally) the projectile fired is simply a straight brick being moved by a BodyVelocity in the direction of the part's CFrame.lookVector property. What I'm hoping to achieve is a way in which the part 'fluctuates', rather like a lightning bolt, to give it a sense of instability.

This Gyazo image better demonstrates what I'm trying to do with the projectile

The part will 'waver' slightly as it moves, but still arrive at the position the player clicks (mouse.Hit.p).

To be clear, the tool already fires a projectile at the position of the player's mouse - I am not asking for assistance on that part, rather a way to add this effect to the projectile itself.

I'm happy to provide more information about what I'm trying to achieve or any parts of my current code if necessary.

I think adding more body velocities at different points to achieve the effect HelperScripting -4 — 8mo
I'm not great at programming but could you put a script in the projectile that changes its velocity? V = V + 0,10,0 Wait 0.5 V = V - 0,10,0? That would "waver" the part while getting it close to the target (I'm a noob at programming so don't trust this script until tested) OBenjOne 81 — 8mo

Answer this question