It's pretty easy to make a basic FilteringEnabled compatible gun:
- Send the bullet spread seed to the client (unless you have a more secure idea).
- When the client clicks, fire the RemoteEvent.
- Create the ray cast and trace client-side immediately.
- Server-side, create the ray cast and pass the information on to all clients which are not the sender because the sender has already seen the laser.
- Other clients should create the ray trace from the client's gun to the target. Alternatively, create it from the position it was fired at, though this will appear "laggier" to other clients.
- For animations, simply replicate an indicator of when it starts, and interrupt it if necessary. Anything else wastes bandwith.
|