Spawning vehicles server side sometimes leads to those vehicles being frozen in place. This can be detected using IsEntityPositionFrozen
on both client and server side.
Seems to happen across the board on all server versions, Linux or Windows doesn’t matter. I’ve had reports reaching all the way back to late 2024.
My resource AdvancedParking
uses CreateVehicleServerSetter
extensively. This resource runs on 1000+ servers and I get occasional reports about this behavior which can only really be fixed by an admin/mod on the server by using noclip while in the vehicle to essentially unfreeze it. Some servers suffer from this on a daily basis with multiple vehicles, others have never encountered this problem. And so far I could not find any sort of connection between the ones that do have it.
Since it is impossible to know why the vehicle was frozen, I cannot just unfreeze it as it might have been frozen on purpose (e.g. one of the many mechanic scripts out there etc).
The sheer randomness leads me to believe that this might be caused by the network sync from the server itself. E.g. some values not propagating properly… or a safety feature freezing the vehicles so that they don’t fall (collision issues?).
In the recent experimental version of my script that has received consistent updates (especially for debugging purposes) introduced a file that overwrites FreezeEntityPosition
in (client and server side) Lua resources and allows logging when it happened to which vehicle. Some of my customers have adopted this version and introduced this file in all of their resources that contain that native. And on server side I explicitly introduced a check that checks all vehicles and if any of them has been (un)frozen.
I could not find any connection to this issue. The server side check sometimes catches frozen vehicles without a corresponding debug line from the file mentioned above. These are the ones that are then reported to me by the server owner as normal players simply cannot do anything about this frozen state as you can imagine.
So far the only consistent thing seems to be that it happens when a vehicle just spawned successfully. I will use this to create a workaround and forcefully unfreeze the vehicle shortly after spawning.
However that doesn’t fix the underlying issue and especially any script that explicitly sets a vehicle as frozen upon spawn will be broken through that workaround without further changes.
How AdvancedParking works under the hood / reproduction steps:
- Spawn vehicle using
CreateVehicleServerSetter
in a radius up to 200m around the nearest player. - Setting a state bag on that vehicle containing all necessary
data
(tuning, extras, etc.). - Setting all previously saved state bags (yes, we made sure that none of them cause the freezing).
- Client receives
data
state bag, applies all changes. - Server waits until all necessary client changes have been detected.
- Sets the
data
state bag to nil so it doesn’t get applied each and every time.
I have never been able to reproduce the issue on my end but I’ve been witness to many times on my customers servers. It has only happened to a load of customers so far and things like player count and how many vehicles have been saved in AdvancedParking does not seem to matter. There are servers with 100+ players and several hundreds of vehicles that don’t encounter it… Some others do have it on a daily basis.
The current most active customer (latest check: Gamebuild 3407; b13943/Win) that I chat with about this issue has around 30 saved vehicles (not a lot compared to most servers) and 3-5 each day have this issue after spawning.