Hello
In case the player loses internet connection for some time and then reconnects automatically, are any of the local scripts re-executed - starter player scripts, starter character scripts, etc.?
I am wondering at what place I must put a code, which will verify and correct the client environment, if it has lost synchronization with the server while the player was disconnected?
any scripts will not be re-executed, what you mean under internet connection loss is high ping that can cause longer delay between client and server communication
for example you have 1200 ms ping which is too high and if you will fire the server using RemoteEvents while having connection issues the server will be triggered only after 1200 miliseconds (1.2 seconds) after you had fired it
to get player’s ping you can use Player:GetNetworkPing()
I do not mean high ping
I mean if the player loses connection for like 30sec - 1 min. Not sure how long will be before he is kicked out of the game…
If there is no connection to the player for 1 min. and his client automatically reconnects when the connection is back, will the client receive all missed RemoteEvents which were fired while he was disconnected?
interesting
and if the internet connection is completely lost for some time and the server disconnects the client, then the player will need to reconnect manually, but this would be equivalent to a new player joining - the client data will be completely reinitialized and the “starter” scripts will be run?
There’s no specific Events that fires after the Player Reconnects into the game. If the Player loses the Connection and Reconnects back to the game, It’ll be the equivalent of a new Player joining the game. So that’s why if you have anything that Caches information about a certain Player (or anything related to it) you should always remove it upon the Player leaves.
And I guess if the client is not fully disconnected (only a very high ping situation), when the normal communication is restored he will receive immediately all “missed” events - not only the remoteEvents but also missed events like ValueChanged, AttributeChanged, etc.?