When i fire a remote event, as soon as its fired i get the position on the server, but that position is a few studs behind what the actual position is on the client at that exact same time (gets worse with higher ping), i dont actually know whats causing this buts its annoying when trying to make magnitude checks in melee weapons, and is there any way to wait for the position to update to what it was when the remote event was fired for the client
is it maybe because of priorities on the server? and if so is ther any way to change them?
There is a small gap between when the server receives a RemoteEvent signal and the time that it is sent. You will need to add some leeway in between. Upon testing I found that there is around a 0.03 second delay between the fire and the received event.
Okay so when I fire the event whilst im moving, this is the position of my humanoidrootpart to client:
But at the same time on the event i get the humanoidrootparts position from the server
from the direction im moving, this is behind where i was on the client when i fired the event, does the server receive and do stuff with remote events before updating the characters position, and is there a way to wait for the server to get the updated position, to make it so the characters position is updated first? Because its currently processing the remote event wayy before it processes that the character has moved close enough for the magnitude check to be successful
this might not make sense but yeh
( i dont want to just use a wait because that isnt reliable because the delay between is dependent on the ping & it sometimes shows you dealing damage a decent amount of time after you hit them to the players), and if i check multiple times then it will still sometimes show the damage delay, games like https://www.roblox.com/games/4169490976/Mortem-Metallum-Alpha seem to be able to do this somehow
I dont understand what your asking… for melee weapons I would do the damage immediately on the client and then wait for the server to respond whether or not its valid
but the server doesnt think its valid because the position of the character when the remote event is fired is behind where it is to the client to the server, i am asking if theres a way to accurately wait for the server to catch up to the characters position when the event was fired without using wait()s before checking if the character is too far away to hit (with the magnitude check)
update on this i couldnt find an actual fix, roblox replicates character position around 16ms slower still, the fix i use is to just make the checks on the server bigger if you are moving to compensate for the delay
oh and yeah mortem metallum does that too they dont have some magical fix