How can I secure client-sided hit detection?

Straight up, I will say this is not a regular situation of checking magnitude or raycasting to check if it is a true hit. This is for a PvE bullethell game. I wanted the players to have a responsive experience with the bullets, which means detection needs to be client sided, especially from enemies. You might be already thinking that they could just disable the remote and no hits on them would ever register (I would restrict the targets to each client), however, this is exactly what I am trying to secure.

Is there a reliable way for the server to know if a bullet hit while the client is handling the detection, even if the client did not register it?

well… does it matter?
is there any benefit to fixing it, does not fixing it ruin the experience for the other players?

Yes, obviously it improves the experience and makes them not get hit after dodging. Why would I not want it?

This great video : Stop Hackers / Exploiters - Roblox Scripting Tutorial - YouTube

by @5uphi [I sincerely suggest you watch this, he is a goat].

Explains [at the end] about things that related to Touched [you can apply it onto RayCasting aswell. And he shows how to secure such things.

I hope I understood your question well.

2 Likes

Yes, I have seen this vídeo and found it very useful! However, although this helps patching false positives, I am trying to prevent false negatives. The purpose of wanting this is to make the enemy’s bullets client sided, in turn giving better responsiveness to the players. Excuse me if the concept seems stupid, I will try to explain more if requested further.