Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Gun registers damage in client and not the sever?

Asked by 4 years ago

I asked a question about how somebody can get hit with a weapon and die on 1 screen and not on the victims screen. A kind user named synkrio said that

"This is because the damage is registered on the client, not the server. Use remote events to make it compatible with filtering-enabled".

Can you please tell me what I should do for this (scripts and other things) If you want the code for the gun and knife just ask. Thanks.

0
This is not a request site, so we won't do it for you. But I can let you in on what to do. The Server replicates all information to the connected computers (clients), however, whatever happens on the clients side that wasn't induced by the server, won't send or update for everyone else due to security reasons Ziffixture 6913 — 4y
0
We use RemoteEvents to tell the Server what information we want from the Client to be allowed to send, almost like a verified vehicle through a border security Ziffixture 6913 — 4y
0
You can look it up in the ROBLOX Wiki—Remote Events—to see how to apply them. But the gist is, when the LocalScript detects a hit, send the information to a ServerScript (Script) via the RemoteEvent, and then code the death handling from there Ziffixture 6913 — 4y
0
Ok, thank you for your time. SpringZXL 2 — 4y
0
TL;DR it only changes on client to try to prevent exploits so you would use a remote event to change on the server HappyTimIsHim 652 — 4y

Answer this question