So I am currently creating a projectile system for part of my game, said projectile will probably have a lot of effects and other stuff, so I was thinking that I would do all that on the client.
Now my question is how I should tell the client where to put said projectile, like should I just send remote events every frame to tell it where to go?
One thing I thought of is just making a part you cant collide with, thats anchored and invisible on the server, the client would then just apply effects to it, and then the server would just move that part.
Anyhow, I was curious if there are any better ways to do this, thanks!
If you can keep projectiles organized in some specific folder, then you can listen for ChildAdded to receive a projectile instance, and apply VFX on the client
The way I’ve done it, which works really well, but is a bit math heavy, is to have the server tell the client when the animation starts, and I think when it ends (or I send when the animation ends, if there are no collisions). The client animates the projectile until it hits something, or until it receives the second remote from the server. Note that the projectile may hit a different object on the client compared to the server, so when the second remote is received, the client should match the server’s results, ignoring the client’s results
The animation of the projectile can be done with a f(t) function. You give time to the function, and it spits out a position or CFrame
Videos
This is my own projectile module,
Performance is really good, network usage is very low, and my module is not limited to typical projectiles, which makes the flying bubbles possible. It’s a sin(t) type of function
A problem you’ll probably encounter with sending the position every frame, or using a server sided part and moving it on the server, is that the result wont be smooth on the client (unless you use TweenService? don’t know). You will also have higher network usage, which could be problematic, or totally fine, depending on how many projectiles you have
I’ll leave it at that for a first reply, but I can explain some stuff in depth as needed. You could also look into ProjectileModules available on the forum, but I am not familiar with them