How to handle flourishing projectiles smoothly?

robloxapp-20240402-2126089.wmv (6.4 MB)

So this is a fire projectile, as you can see, but there’s a huge issue with it: It’s all on the server.

I know you’re supposed to handle the visuals on the client, and everything else on the server. However, the fire projectile is a fire projectile. I have a script that gets players in a certain range and deals damage to them even if they’re not the target of the projectile, it’s supposed to convey fly-by damage.

As you also can see, it randomly flourishes using cubic curves.

How would I go about damaging players that the projectile is flying by?

1 Like

Thanks! I improved the design by separating the function into SpellCast and Effects components. SpellCast now runs on the server, handling all damage logic. Within each interpolation of the cubic curve, I implemented a function to identify players within a Region3 and apply damage accordingly. As for the effects, the SpellCast function triggers a ‘UniversalEffects’ event on all clients, providing the spell name, seedID (ensuring synchronized pseudorandom behavior for the fireball’s path), the player, and the target position. The client receives and performs the fireball animation.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.