I’m using raycasting and cframe to move my projectiles, the raycasts detect hits of course. My Issue is with the replication of the projectiles on different clients (with various pings) it’s almost impossible to sync them and the result is on one client it shows the projectile barely missing and on another client it shows the projectile hitting, this is frustrating me as I have made adjustments to the length of the other client’s rays (attempting to catch up with the other projectile) but to no avail. This has all been a very confusing experience and if anyone with skill in this area can help, I would highly appreciate it.
This is somewhat of a complicated issue. You can either choose to be exact and secure by doing everything on server but lose on performance. Or you can choose to lose some security and precision but have better performance by doing it on client. If you have good and efficient code and replicate it properly then the difference between them should be to the point where it is barely noticeable. I suggest having the effects and whatnot start as soon as the client activates the move, then replicating it to the other players.
Well my projectiles have a simulated physics drop (ballistic arc), using your method I don’t see how I can simulate drop without the use of multiple tweens not to mention I’d still need a good method for hit detection. What I’m doing now is casting a series of short rays one after another, (slightly dipping the nose of the next ray) that essentially creates an arc as it heads toward the target. Each iteration I’m also adjusting the CFrame of the projectile to the end of the last ray. This creates perfect hit detection on the client, the issue was the replication of this method to all clients (with various pings). Still, thanks for your input.