Greetings developers
In the game I’m working on, players’ characters are moved (model:MoveTo(v3)
) from point A to B on demand through a RemoteEvent. Concretely: user clicks on UI button, client script detects click, sends signal to server, server script receives signal and moves character.
Logically, this works, but when the client sends the signal in the middle of a lag-spike, the character does not get moved. Hence a rare occurrence, so I’ve started measuring the frequency of this issue and have reached to around 8-10reports in around 50-70 visits.
My only guess is that this happens due to Roblox’ move prediction system, as there will always be some latency, in order to keep player movement smooth. This technically interferes with what I’m doing and in the case of someone having high latency, so I’ve taken the following last resort measures:
- Temporarily set player movement type to Scriptable, and then back to normal (UserChoice). Maybe this would pause the movement predictioning?
- And just to be sure, I put moveto() in a repeating loop with the until condition being that the distance between the character and point B is smaller than 3.
I’d like to know if my theory is correct or false and if I’m applying good or wrong measures, and what I should do instead. Thanks in advance.