Circle form projectile help

Hi, I know I made a post regarding this kind of projectile but I still need help achieving this kind of projectile where it goes up and down in a circle form and it will spawn craters and people near it will be damaged. Any help would be appreciated.

That’s… Complicated…

I’m not sure how you’d specifically replicate that effect, but here’s what I would do.

I would have parts with a particle emitter either tweened or use a bezier curve. You can search it up on forum tutorials, very very helpful and interesting.

Then, for the explosion effect, you’d either use an actual explosion object, or some sort of part detection.

You can split this into multiple parts, and should because it will make your code easier to re-use later. I would start with the crater effect which is just generating a ring of parts and shrinking them away with a tween after a second.

1 Like

You might find the equation for a circle useful.
(x,y) = (sinΘ, cosΘ)

function pointOnCircle(angle)
    local angleRad = math.rad(angle)
    return Vector3.new(math.cos(angleRad), 0, math.sin(angleRad))
end

This function will return unique unit vectors for every angle that is a number between 0 and 360. Values outside this range will repeat due to the nature of the sine and cosine functions.

1 Like

The path could be a bezier curve with the A point being the player, the C point being the position from this and the B point being the C point + Vector3.new(0,an arbitrary number,0)

2 Likes

So how can I get the c point?? Im so sorry im kinda bad at bezier curves :sob:

crater is done I just need the up and down projectile and forming it to a circle

and damaging a player who is near to it