False ping hit triggers in game

Um, may I ask why you are using a remote function? The whole point of them is to return values sent from the client to the server and vice versa. You could jsut use remote events.

From Valldoe the guy who made the script: before we use to return and it was very delayed so we remade it do you believe that causes the issue?

i believe it shouldn’t cause any issues since it returns nothing

Yeah it doesn’t return anything but it’s just sort of weird I was thinking.

we will change it but my friend believes thats not the issue
besides we dont have anyone to test the theory rn

Well I don’t think returning should be a problem, but this may be. Using deprecated things like rays. Possibly, unlikely but possible. Also I see in your code you are using alot of things that are heavy on resources like task.spawn, that might also be a cause.

since when are rays deprecated ??? also what can we use instead of rays ?

You can use raycasts instead of using rays, which you are already doing.

1 Like

sure we will try changing that! but probs isnt the problem hes currently looking if he has made any mistakes in the order of the events.

By the way I think your code for the input function may have a bug, there’s a second parameter in the event called “gameprocess” which just checks if the user clicks the input through the chat instead. Your function doesn’t check for that, meaning if a player just decides to click mousebutton1 on the chat bar it’ll count as the input and fire the raycast.

Here’s a random topic I found about this for more information about the gameprocess:

Thanks, we’re changing that right now. If you find anything else out the ordinary, let me know. For now we will do all the changes and come back to you in a few hours, since its 2am.

Does the shoot request print on the server? Also if I’m not mistaken- are you also trusting the client to correctly send in the player who got hit? I would recommend running some sort of sanity check to verify the data sent through the RemoteFunction.

Yes, we’re currently trusting the client at 100% for hit register.
What do you mean by “shoot request print on the server”?

Sorry- I meant the warn statement on the serverside function. Does that print when the laggy player hits someone (and it doesn’t register)?

Alright. This is unrelated to the current topic, but I would advise you to look into some alternatives as any exploiter could just fire the RemoteEvent as soon as they recieve the gun.

  1. We know it is very unsafe . We will work on the issue in the future, but we have bigger problems at hand right now.
  2. No, it says they haven’t hit.

Could you add a print statement next to the :InvokeServer on the client? If that one doesn’t print the the issue is likely on the clientside.

We know the issue is client sided. We cant test right now, because the bug requires a high ping player to be replicated. I will update you on the situation when we are able to test. For now we are going to fix the issues pointed out by the other developers.

Theres an option in studio where you can increase the Incoming Replication Lag, this simulates high ping

Can you give me an article!
Really thankful!

1 Like

“If you want to simulate lag in Roblox Studio, you can go to File → Settings → Network → IncomingReplicationLag and adjust the number of seconds of lag that Studio will simulate when running a test server.”
source