if hitted_a_humanoid then
DamageEvent:FireServer(hitted_a_humanoid)
end
SERVER SCRIPT
function onDamageEvent(plr, humanoid)
humanoid:TakeDamage(10)
I know the security is bad but thats not what Im asking, I can handle that myself. I just want to know if this is how others deal damage because it has a huge delay for me (this is just probably my ping) but just to make sure.
Correct. There’s typically a lot more work involved as far as security and other functionality goes, but it’s usually the client firing a remote and the server determining whether it’s appropriate to deal damage or not plus any work before or after dealing damage.
A remote’s response time will primarily depend on the server region. If your machine is further away from the region which the server is in, then the time it’ll take for the message to be delivered from your client to the server will be much longer. The same is applicable in reverse: the time it takes for your client to receive packets from the server will take longer.