Hi. So I’m currently trying to implement some attacks into my game, but I realized that the hitbox’s positions aren’t accurate at all. I soon realised that this is caused by a delay of player movement on the server. The video attached shows a part that indicates where the server thinks I am. I was wondering if there was any way to get around this other than using remote events?
Video:
Yes, there is a way to get around the Network’s inherent lag, but it requires good knowledge of anti-cheat, because it gives the client a lot of power to exploit if uncontrolled.
Run hitboxes on each client locally, the server of course does this too, so it can do anti-cheat, but each client has it’s own versions of the hitboxes. This means, that, the hitboxes will be 100% accurate for that client. This can cause some desync, so a player gets hit when they think they are too far to be struck, but for the player striking there is 0 lag.
Again, you have to make sure the server runs sanity checks and anti-cheat or else exploiters can use this and run with it.