SetVehicleDoorBroken Server side doesnt sync with closest players

i was trying to sync the vehicle doors but in this case it doesn’t matter if the door is deleted on the server or the client side, always the other person will see the door model on the ground.
The steps to reproduce:
1)- Create a vehicle server side (any vehicle) with CreateVehicleServerSetter.
2)- Create a Command and send an event to the server and delete the door (i even did the SetVehicleDoorBroken on client to test and same result).
3)- For the person who trigger the command the door disappears, but the rest of the people the door remains in the ground.

First Video:

Second Video:


PD: On the first video i already delete the door server side when the vehicle spawn.
On the second video i remove a door with a command then i take the second character and go really far from the vehicle, when i come back the doors are deleted from the ground.

PD2: If the vehicle is created client side the problem doesn’t not exist.

I found a “solution” to this problem, if i use State bags the problem doesnt get replicated

Hey, could you share an example on how you achieved it? Thanks in advance!

Yes, Create the vehicle server side, then apply the state bag with the info and on the client just “listen” to the bag and apply all the damage on the client.


local vehicle = CreateVehicleServerSetter("adder", "automobile",  coords.position.x, coords.position.y, coords.position.z, coords.position.w)
while not DoesEntityExist(vehicle) do

local network = NetworkGetNetworkIdFromEntity(vehicle)
local netid = NetworkGetEntityFromNetworkId(network)
local state = Entity(vehicle.netid).state:set("doors",{--[[ Damage Info]]},true)


AddStateBagChangeHandler('doors', nil, function(bagName, key, value, _unused, replicated)
    local entity = GetEntityFromStateBagName(bagName)
    if entity == 0 then return end
    --Check and apply the damage here
1 Like

Thanks a lot for your response, I look into it!