I want make a client sided hit detection with server security checks.
The problem is that is my first time doing that and i have some issues:
- How should i make security checks on server? Its easy for spells like a fire wall that dont move, but for a fireball,beams etc, i dont have idea what to do,cause if the client fire a remote event for the server with the players that supposedly were hit due the minimun lag the players wont be on the same position anymore when server try check, so it Will cause the damage.
- My game Will have a Elemental Interactions system, that you guys can take look here Elemental Interactions (Spellbreak or Genshin Impact) bassicaly its a system that i Will need check when two spells collided (like a water spell collided with a fire spell), i Will need a hitbox on server for that, and that hitbox Will need be synced with the client hitbox, that have no Idea what to do (i could send a os.clock() on the remote event but its easy to exploit, or i could client fire the remote - server make the hitbox - server fire all clients with the os.clock() - clients make the efffects basead on their own lag, but i think that would be bad cause the client that fired the skill wont have a instantly answer that is the reason to make effects client sided.
I take a look on some topics from others People, but no one have some answer for me since i am the first doing that Elemental Interactions system, iam days trying figure out a solution and making tests and more tests.