I’m currently thinking of how I’m going to set up a hit-validation system for a project of mine, but I may have ran into a potential issue. Essentially, in order to maintain responsiveness, when a client shoots a projectile, all physics/interactions of that projectile are handled client side. Of course, this is a huge security concern, which is why my server-side validation model includes duplicating the projectile and analyzing its behavior’s and interactions on the server. If the behavior of the client’s projectile is different than that of the servers, I’d be able to “cancel” the result of the client’s projectile.
Now, this means the client will see two projectiles; the projectile managed on the client, and the projectile managed on the server (that will be seen by the client shortly after due to latency).
How can I make it such that the client does NOT see the server-sided projectile?
It would not be based on remote events. All server-side objects are replicated to each client by default, so my concern is how I’d make it not replicate to one individual client. I suppose I could just make the particle invisible for the client.
You could have some sort of attribute that says the player the bullet came from on the server object. Then have a client script that would make all bullets from the server that the local player shot invisible.